上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 48 下一页
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2017-10-23 07:56 daniel456 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2017-10-22 21:58 daniel456 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2017-10-22 21:53 daniel456 阅读(117) 评论(0) 推荐(0) 编辑
摘要: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
posted @ 2017-10-22 21:41 daniel456 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2017-10-22 21:36 daniel456 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values 阅读全文
posted @ 2017-10-22 21:28 daniel456 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Example 2: 阅读全文
posted @ 2017-10-22 21:25 daniel456 阅读(105) 评论(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 @ 2017-10-22 21:23 daniel456 阅读(98) 评论(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 阅读(407) 评论(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 阅读(498) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 48 下一页