2015年2月2日
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t... 阅读全文
posted @ 2015-02-02 14:33 Chris兔的小佳佳 阅读(110) 评论(0) 推荐(0)
摘要: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2015-02-02 13:24 Chris兔的小佳佳 阅读(94) 评论(0) 推荐(0)
  2015年1月31日
摘要: 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兔的小佳佳 阅读(136) 评论(0) 推荐(0)
摘要: 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兔的小佳佳 阅读(174) 评论(0) 推荐(0)
  2015年1月20日
摘要: 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兔的小佳佳 阅读(92) 评论(0) 推荐(0)
  2015年1月18日
摘要: Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.对于这道题,之前并不知道java中有一个封装好的数据结构--优先队列。优先队列其实相当于一个最大或最小堆,能... 阅读全文
posted @ 2015-01-18 17:02 Chris兔的小佳佳 阅读(123) 评论(0) 推荐(0)
  2015年1月11日
摘要: 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兔的小佳佳 阅读(136) 评论(0) 推荐(0)
  2015年1月4日
摘要: 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兔的小佳佳 阅读(123) 评论(0) 推荐(0)
摘要: 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兔的小佳佳 阅读(116) 评论(0) 推荐(0)
  2014年12月25日
摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2014-12-25 15:35 Chris兔的小佳佳 阅读(96) 评论(0) 推荐(0)