2015年5月22日

摘要: Title: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the follo 阅读全文
posted @ 2015-05-22 14:29 月下之风 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Title: 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 阅读全文
posted @ 2015-05-22 10:27 月下之风 阅读(183) 评论(0) 推荐(0) 编辑

2015年5月19日

摘要: Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that: F 阅读全文
posted @ 2015-05-19 15:18 月下之风 阅读(217) 评论(0) 推荐(0) 编辑

2015年5月18日

摘要: Title: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, Re 阅读全文
posted @ 2015-05-18 15:23 月下之风 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Title: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one tran 阅读全文
posted @ 2015-05-18 11:13 月下之风 阅读(222) 评论(0) 推荐(0) 编辑

2015年5月15日

摘要: Title: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given 阅读全文
posted @ 2015-05-15 11:18 月下之风 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Title:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,... 阅读全文
posted @ 2015-05-15 11:15 月下之风 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Title: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set 阅读全文
posted @ 2015-05-15 11:12 月下之风 阅读(140) 评论(0) 推荐(0) 编辑

2015年5月14日

摘要: Title: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given 阅读全文
posted @ 2015-05-14 20:57 月下之风 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Title: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 阅读全文
posted @ 2015-05-14 20:53 月下之风 阅读(133) 评论(0) 推荐(0) 编辑

导航