摘要:
排好序的...中间是root , root左边是left,root右边是right递归建树./** * 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* createTree(vector&num , int start , in... 阅读全文
posted @ 2013-12-31 19:58 1957 阅读(185) 评论(0) 推荐(0) 编辑