Leetcode——538. 把二叉搜索树转换为累加树

思路: 相似于中序遍历可是是右子树->根节点->左子树这样来。node /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {}
相关文章
相关标签/搜索