题目链接:CandyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requiremen...
More »
题目链接:Gas StationThere 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 ...
More »
题目链接:Clone GraphClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ’s undirected graph serialization:Nodes are labeled un...
More »
题目链接:Palindrome PartitioningGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.F...
More »
题目链接:Surrounded RegionsGiven a 2D board containing ‘X’ and ‘O’, capture all regions surrounded by ‘X’.A region is captured by flipping all ‘O’s into ‘X’s in that surro...
More »
题目链接:Sum Root to Leaf NumbersGiven 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...
More »
题目链接:Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3...
More »
题目链接:Word LadderGiven two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter c...
More »
题目链接:Valid PalindromeGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,“A man, a plan, a canal: ...
More »
题目链接:Binary Tree Maximum Path SumGiven 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 t...
More »