摘要:
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2016-10-12 12:24
微微程序媛
阅读(99)
评论(0)
推荐(0)
摘要:
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-10-12 12:06
微微程序媛
阅读(108)
评论(0)
推荐(0)
摘要:
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 阅读全文
posted @ 2016-10-12 11:53
微微程序媛
阅读(128)
评论(0)
推荐(0)
摘要:
Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. For example:Given 阅读全文
posted @ 2016-10-12 11:52
微微程序媛
阅读(127)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any 阅读全文
posted @ 2016-10-12 10:22
微微程序媛
阅读(135)
评论(0)
推荐(0)
摘要:
Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 阅读全文
posted @ 2016-10-12 05:49
微微程序媛
阅读(109)
评论(0)
推荐(0)
摘要:
Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq 阅读全文
posted @ 2016-10-12 04:17
微微程序媛
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号