LeetCode Gas Station DescriptionThere 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 costs cost[i] of gas to travel from station 6月 27 2015 #leetcode
LeetCode Number Of Islands DescriptionGiven a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You 6月 26 2015 #leetcode
LeetCode Reverse Words in a String DescriptionGiven an input string, reverse the string word by word. For example,Given s = “the sky is blue”,return “blue is sky the”. The original problem is here. The original code is here. 6月 26 2015 #leetcode
LeetCode Path Sum DescriptionGiven 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 sum. For example:Given the below binary tree 6月 26 2015 #leetcode
LeetCode Sum Root to Leaf Numbers DescriptionGiven 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 which represents the number 123. Find 6月 26 2015 #leetcode
LeetCode Maximum Depth of Binary Tree DescriptionGiven 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 leaf node. The original problem is here. 6月 26 2015 #leetcode
LeetCode Minimum Depth of Binary Tree DescriptionGiven 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 leaf node. The original problem is here. 6月 26 2015 #leetcode
LeetCode Kth Largest Element in an Array DescriptionFind the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example,Given [3,2,1,5,6,4] and k = 2, retu 6月 25 2015 #leetcode
LeetCode Isomorphic Strings DescriptionGiven two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with 6月 25 2015 #leetcode
LeetCode Word Break DescriptionGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, givens = “leetcode”,dict = [“l 6月 25 2015 #leetcode