上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it cost 阅读全文
posted @ 2016-10-14 00:11 微微程序媛 阅读(310) 评论(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 @ 2016-10-13 09:30 微微程序媛 阅读(175) 评论(0) 推荐(0)
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. Hide Company 阅读全文
posted @ 2016-10-13 08:16 微微程序媛 阅读(128) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2016-10-13 06:42 微微程序媛 阅读(148) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2016-10-13 06:11 微微程序媛 阅读(123) 评论(0) 推荐(0)
摘要: 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)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页