摘要: Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree./** * Definiti... 阅读全文
posted @ 2014-06-21 23:43 海滨银枪小霸王 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given preorder and inorder traversal of a tree, construct the binary tree./** * Definition for binary tree * struct TreeNode { * int val; * Tr... 阅读全文
posted @ 2014-06-21 23:29 海滨银枪小霸王 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n... 阅读全文
posted @ 2014-06-21 21:32 海滨银枪小霸王 阅读(134) 评论(0) 推荐(0) 编辑