上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页
摘要: Binary Tree Zigzag Level Order TraversalGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then... 阅读全文
posted @ 2014-11-30 16:58 陆草纯 阅读(1709) 评论(0) 推荐(0) 编辑
摘要: Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume... 阅读全文
posted @ 2014-11-30 16:08 陆草纯 阅读(2006) 评论(0) 推荐(1) 编辑
摘要: Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assu... 阅读全文
posted @ 2014-11-30 13:46 陆草纯 阅读(409) 评论(0) 推荐(0) 编辑
摘要: Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.这题思路参照Conve... 阅读全文
posted @ 2014-11-29 19:05 陆草纯 阅读(385) 评论(0) 推荐(0) 编辑
摘要: Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre... 阅读全文
posted @ 2014-11-29 16:18 陆草纯 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root... 阅读全文
posted @ 2014-11-29 15:56 陆草纯 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Path Sum IIGiven 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 tr... 阅读全文
posted @ 2014-11-29 15:47 陆草纯 阅读(266) 评论(0) 推荐(0) 编辑
摘要: Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give... 阅读全文
posted @ 2014-11-29 15:35 陆草纯 阅读(1136) 评论(0) 推荐(0) 编辑
摘要: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ... 阅读全文
posted @ 2014-11-29 14:56 陆草纯 阅读(360) 评论(0) 推荐(0) 编辑
摘要: Populating Next Right Pointers in Each Node IIFollow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any ... 阅读全文
posted @ 2014-11-29 11:08 陆草纯 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页