上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb... Read More
posted @ 2014-08-24 22:44 Xylophone Views(143) Comments(0) Diggs(0)
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeate... Read More
posted @ 2014-08-24 22:01 Xylophone Views(367) Comments(0) Diggs(0)
Given an unsorted integer array, find the first missing positive integer.For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2.Your algorithm s... Read More
posted @ 2014-08-24 20:00 Xylophone Views(139) Comments(0) Diggs(0)
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After ... Read More
posted @ 2014-08-24 17:47 Xylophone Views(122) Comments(0) Diggs(0)
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... Read More
posted @ 2014-08-23 17:50 Xylophone Views(439) Comments(0) Diggs(0)
Divide two integers without using multiplication, division and mod operator.常常出现大的负数,无法用abs()转换成正数的情况class Solution{private: vector f;public: in... Read More
posted @ 2014-08-23 17:04 Xylophone Views(267) Comments(0) Diggs(0)
Write a function to find the longest common prefix string amongst an array of strings.先把排好序的前两个字符串的最大前缀求出来,然后看这个前缀是否是其他字符串的前缀,如果不是,缩短这个前缀再看是否是其他字符串的前缀... Read More
posted @ 2014-08-22 00:06 Xylophone Views(152) Comments(0) Diggs(0)
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i... Read More
posted @ 2014-08-21 23:24 Xylophone Views(144) Comments(0) Diggs(0)
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... Read More
posted @ 2014-08-21 21:14 Xylophone Views(165) Comments(0) Diggs(0)
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.用map记录出现的string的下标,避免了再次遍历。class Solu... Read More
posted @ 2014-08-21 15:33 Xylophone Views(136) Comments(0) Diggs(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页