摘要:
题目: Implement a trie with insert, search, and startsWith methods. 链接: http://leetcode.com/problems/implement-trie-prefix-tree/ 题解: 设计Trie。题目给了很多条件,所以大 阅读全文
posted @ 2015-05-11 03:58
YRB
阅读(725)
评论(0)
推荐(0)
摘要:
题目: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you ha 阅读全文
posted @ 2015-05-11 03:53
YRB
阅读(4748)
评论(0)
推荐(0)
摘要:
题目: Reverse a singly linked list. 链接: http://leetcode.com/problems/reverse-linked-list/ 题解: 反转单链表,必须做得非常熟练。这个method将会是许多复杂题目的一个组成部分。 Time Complexity - 阅读全文
posted @ 2015-05-11 03:51
YRB
阅读(401)
评论(0)
推荐(0)
摘要:
题目: Given 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 occur 阅读全文
posted @ 2015-05-11 03:49
YRB
阅读(616)
评论(0)
推荐(0)
摘要:
题目: Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and 阅读全文
posted @ 2015-05-11 03:48
YRB
阅读(841)
评论(0)
推荐(0)
摘要:
题目: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 阅读全文
posted @ 2015-05-11 03:46
YRB
阅读(383)
评论(0)
推荐(0)
摘要:
题目: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive in 阅读全文
posted @ 2015-05-11 03:43
YRB
阅读(944)
评论(0)
推荐(0)
摘要:
题目: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range 阅读全文
posted @ 2015-05-11 03:42
YRB
阅读(409)
评论(0)
推荐(0)

浙公网安备 33010602011771号