上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh... 阅读全文
posted @ 2015-05-10 14:04 mrpod2g 阅读(103) 评论(0) 推荐(0)
摘要: Implement a trie withinsert,search, andstartsWithmethods.Trie,又称单词查找树或键树,是一种树形结构。典型应用是用于统计和排序大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计或是前缀匹配。它有3个基本性质:根节点不包... 阅读全文
posted @ 2015-05-09 15:15 mrpod2g 阅读(394) 评论(0) 推荐(0)
摘要: There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs... 阅读全文
posted @ 2015-05-07 20:09 mrpod2g 阅读(167) 评论(0) 推荐(0)
摘要: Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,... 阅读全文
posted @ 2015-05-06 11:08 mrpod2g 阅读(120) 评论(0) 推荐(0)
摘要: Reverse a singly linked list./** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int... 阅读全文
posted @ 2015-05-05 16:50 mrpod2g 阅读(71) 评论(0) 推荐(0)
摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
posted @ 2015-05-05 12:04 mrpod2g 阅读(127) 评论(0) 推荐(0)
摘要: Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
posted @ 2015-05-04 18:59 mrpod2g 阅读(145) 评论(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 @ 2015-05-01 18:08 mrpod2g 阅读(146) 评论(0) 推荐(0)
摘要: Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ... 阅读全文
posted @ 2015-04-29 10:29 mrpod2g 阅读(376) 评论(0) 推荐(0)
摘要: Description:Count the number of prime numbers less than a non-negative number,nReferences:How Many Primes Are There?Sieve of Eratosthenes由于一个合数总是可以分解成... 阅读全文
posted @ 2015-04-28 21:25 mrpod2g 阅读(134) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 13 下一页