摘要: We have a list of bus routes. Each routes[i] is a bus route that the i-th bus repeats forever. For example if routes[0] = [1, 5, 7], this means that t 阅读全文
posted @ 2018-10-17 09:24 轻风舞动 阅读(901) 评论(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 @ 2018-10-17 07:56 轻风舞动 阅读(560) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any 阅读全文
posted @ 2018-10-17 07:41 轻风舞动 阅读(426) 评论(0) 推荐(0) 编辑
摘要: Given a list of strings, you could concatenate these strings together into a loop, where for each string you could choose to reverse it or not. Among 阅读全文
posted @ 2018-10-17 06:38 轻风舞动 阅读(1001) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, you need to find the length of Longest Consecutive Path in Binary Tree. Especially, this path can be either increasing or decreas 阅读全文
posted @ 2018-10-17 06:05 轻风舞动 阅读(837) 评论(0) 推荐(0) 编辑
摘要: Given a k-ary tree, find the length of the longest consecutive sequence path. The path could be start and end at any node in the treeExampleAn example 阅读全文
posted @ 2018-10-17 06:04 轻风舞动 阅读(308) 评论(0) 推荐(0) 编辑