上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页
摘要: Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that... 阅读全文
posted @ 2015-06-09 20:27 TonyLuis 阅读(623) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjac... 阅读全文
posted @ 2015-06-09 19:58 TonyLuis 阅读(477) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regu... 阅读全文
posted @ 2015-06-09 19:05 TonyLuis 阅读(235) 评论(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 have to... 阅读全文
posted @ 2015-06-09 18:23 TonyLuis 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return... 阅读全文
posted @ 2015-06-09 17:19 TonyLuis 阅读(503) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z.解题思路:参考百度百科:Tri... 阅读全文
posted @ 2015-06-09 16:58 TonyLuis 阅读(1469) 评论(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 have to... 阅读全文
posted @ 2015-06-07 20:27 TonyLuis 阅读(525) 评论(0) 推荐(0) 编辑
摘要: Reverse a singly linked list.解题思路:用Stack实现,JAVA实现如下: public ListNode reverseList(ListNode head) { if(head==null) return null; St... 阅读全文
posted @ 2015-06-07 19:34 TonyLuis 阅读(228) 评论(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 occurrences... 阅读全文
posted @ 2015-06-07 19:27 TonyLuis 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Description:Count the number of prime numbers less than a non-negative number, n.解题思路:空间换时间,开一个空间为n的数组,因为非素数至少可以分解为一个素数,因此遇到素数的时候,将其有限倍置为非素数,这样动态遍历+构造... 阅读全文
posted @ 2015-06-07 19:10 TonyLuis 阅读(298) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页