摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2015-10-26 20:24 eversliver 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,3,2]. Note: Recur 阅读全文
posted @ 2015-10-26 19:26 eversliver 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2015-10-26 11:35 eversliver 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2015-10-26 10:44 eversliver 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree.同样是给出了不会有重复数字 阅读全文
posted @ 2015-10-26 09:46 eversliver 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.从前序以及中序的结果中构造二叉... 阅读全文
posted @ 2015-10-26 09:19 eversliver 阅读(306) 评论(0) 推荐(0) 编辑