上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页
摘要: Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig... 阅读全文
posted @ 2014-05-30 01:21 erictanghu 阅读(104) 评论(0) 推荐(0)
摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2014-05-30 01:21 erictanghu 阅读(106) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
posted @ 2014-05-30 01:21 erictanghu 阅读(187) 评论(0) 推荐(0)
摘要: GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2014-05-30 01:21 erictanghu 阅读(87) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(138) 评论(0) 推荐(0)
摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(106) 评论(0) 推荐(0)
摘要: 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 that surrounded region... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(121) 评论(0) 推荐(0)
摘要: Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(120) 评论(0) 推荐(0)
摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(146) 评论(0) 推荐(0)
摘要: There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi... 阅读全文
posted @ 2014-05-30 01:20 erictanghu 阅读(246) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页