2015年3月12日

leetcode:3Sum Closest

摘要: 题目要求:Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. ... 阅读全文

posted @ 2015-03-12 20:46 Charles晟 阅读(141) 评论(0) 推荐(0)

2015年3月11日

leetcode:Longest Consecutive Sequence

摘要: 题目要求:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The lon... 阅读全文

posted @ 2015-03-11 21:31 Charles晟 阅读(151) 评论(0) 推荐(0)

leetcode: Median of Two Sorted Arrays

摘要: 题目要求:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity shoul... 阅读全文

posted @ 2015-03-11 20:51 Charles晟 阅读(115) 评论(0) 推荐(0)

2015年3月9日

leetcode:Search in Rotated Sorted Array II(duplicated)

摘要: 题目要求:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a functi... 阅读全文

posted @ 2015-03-09 19:48 Charles晟 阅读(127) 评论(0) 推荐(0)

leetcode:Search in Rotated Sorted Array

摘要: 题目要求: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 va... 阅读全文

posted @ 2015-03-09 17:48 Charles晟 阅读(151) 评论(0) 推荐(0)

leetcode :word break

摘要: 题目要求:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For e... 阅读全文

posted @ 2015-03-09 15:49 Charles晟 阅读(156) 评论(0) 推荐(0)

导航