摘要:
Problem Description:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1... 阅读全文
摘要:
Problem Description:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf ... 阅读全文
摘要:
Problem Description:Given 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 th... 阅读全文
摘要:
Problem Description:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ... 阅读全文
摘要:
Problem Description:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindr... 阅读全文
摘要:
Problem Description:Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.Solution: 1 public UndirectedGraph... 阅读全文
摘要:
Problem Description:There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas ta... 阅读全文
摘要:
Problem Description:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to... 阅读全文
摘要:
Problem Description:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Solution: 1 public int singleNumber(int... 阅读全文
摘要:
Problem Description:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Solution:1 Arrays.sort(A... 阅读全文