摘要:
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 @ 2017-10-22 21:23
daniel456
阅读(109)
评论(0)
推荐(0)
摘要:
Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any oneof them. Two 阅读全文
posted @ 2017-10-22 21:20
daniel456
阅读(417)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo 阅读全文
posted @ 2017-10-22 17:33
daniel456
阅读(508)
评论(0)
推荐(0)
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2017-10-22 17:20
daniel456
阅读(108)
评论(0)
推荐(0)
摘要:
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might 阅读全文
posted @ 2017-10-22 17:18
daniel456
阅读(124)
评论(0)
推荐(0)
摘要:
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
posted @ 2017-10-22 17:08
daniel456
阅读(131)
评论(0)
推荐(0)
摘要:
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: 阅读全文
posted @ 2017-10-22 17:05
daniel456
阅读(115)
评论(0)
推荐(0)
摘要:
Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-10-22 17:03
daniel456
阅读(107)
评论(0)
推荐(0)
摘要:
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2017-10-22 16:56
daniel456
阅读(125)
评论(0)
推荐(0)
摘要:
nvert a binary tree. to 方法二:BfS 阅读全文
posted @ 2017-10-22 16:52
daniel456
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号