摘要:
递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {public: TreeNode *build( vector&preorder,vector &inorder,int start,int end,int start1,int end1) ... 阅读全文