Leetcode Next Permutation
摘要:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl...
阅读全文
posted @
2015-01-31 15:39
Chris兔的小佳佳
阅读(137)
推荐(0)
Substring with Concatenation of All Words
摘要:You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
阅读全文
posted @
2015-01-31 13:48
Chris兔的小佳佳
阅读(176)
推荐(0)
Leetcode Remove Duplicates from Sorted Array
摘要:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
阅读全文
posted @
2015-01-20 21:11
Chris兔的小佳佳
阅读(95)
推荐(0)
Leetcode Merge k Sorted Lists
摘要:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.对于这道题,之前并不知道java中有一个封装好的数据结构--优先队列。优先队列其实相当于一个最大或最小堆,能...
阅读全文
posted @
2015-01-18 17:02
Chris兔的小佳佳
阅读(127)
推荐(0)
Leetcode Generate Parentheses
摘要:Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
阅读全文
posted @
2015-01-11 20:58
Chris兔的小佳佳
阅读(138)
推荐(0)
Leetcode Letter Combinations of a Phone Number
摘要: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...
阅读全文
posted @
2015-01-04 23:05
Chris兔的小佳佳
阅读(128)
推荐(0)
leetcode 4Sum
摘要:Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ...
阅读全文
posted @
2015-01-04 20:49
Chris兔的小佳佳
阅读(118)
推荐(0)