摘要:
class Solution {public: TreeNode *buildTree(vector &inorder, vector &postorder) { int ilen = inorder.size(); int plen = postorder.siz... 阅读全文
摘要:
class Solution {public: TreeNode *buildTree(vector &preorder, vector &inorder) { int plen = preorder.size(); int ilen = inorder.size(... 阅读全文
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文
摘要:
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(... 阅读全文