上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
posted @ 2015-11-10 14:28 fenshen371 阅读(140) 评论(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-11-10 14:16 fenshen371 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
posted @ 2015-11-10 14:11 fenshen371 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni... 阅读全文
posted @ 2015-11-10 02:34 fenshen371 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two... 阅读全文
posted @ 2015-11-09 11:10 fenshen371 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
posted @ 2015-11-09 10:43 fenshen371 阅读(134) 评论(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-11-09 08:04 fenshen371 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.思路:应该就是字典树。 1 class T... 阅读全文
posted @ 2015-11-09 07:39 fenshen371 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol... 阅读全文
posted @ 2015-11-08 12:56 fenshen371 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e... 阅读全文
posted @ 2015-11-04 15:37 fenshen371 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页