二叉树的构建
tangyifei1991
这个作者很懒,什么都没留下…
展开
-
Construct Binary Tree from Preorder and Inorder Traversal 前序和中序遍历构建二叉树
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cla原创 2014-01-20 15:25:28 · 584 阅读 · 0 评论 -
Construct Binary Tree from Inorder and Postorder Traversal 中序和后序遍历二叉树
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cla原创 2014-01-20 15:29:03 · 468 阅读 · 0 评论