代码随想录算法训练营第二十三天|669.修剪二叉树、108.将有序数组转换为二叉搜索树、538.把二叉搜索树转换为累加树
669.修剪二叉树classSolution{public:TreeNode*trimBST(TreeNode*root,intlow,inthigh){if(root==nullptr)returnroot;if(root->valright,low,high);returnright;}if(root->val>high){TreeNode*left=trimBST(root->left,lo