摘要:
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 阅读全文
2015年5月22日
摘要:
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 阅读全文
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 阅读全文
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 阅读全文
摘要:
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 阅读全文
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 阅读全文
摘要:
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,... 阅读全文
摘要:
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 阅读全文
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 阅读全文
摘要:
Title: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 阅读全文