摘要: 题目:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integ... 阅读全文
posted @ 2014-07-22 11:35 爱做饭的小莹子 阅读(3890) 评论(1) 推荐(0) 编辑
摘要: 题目:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array w... 阅读全文
posted @ 2014-07-22 11:05 爱做饭的小莹子 阅读(3400) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum... 阅读全文
posted @ 2014-07-22 05:13 爱做饭的小莹子 阅读(6700) 评论(3) 推荐(1) 编辑
摘要: Hashtable:1. key和value都不许有null值2. 使用enumeration遍历3. 同步的,每次只有一个线程能够访问4. 在java中Hashtable是H大写,t小写,而HashMap是H大写,M大写HashMap:1. key和value可以有null值2. 使用itera... 阅读全文
posted @ 2014-07-22 04:10 爱做饭的小莹子 阅读(2203) 评论(0) 推荐(1) 编辑
摘要: 题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the tw... 阅读全文
posted @ 2014-07-22 03:44 爱做饭的小莹子 阅读(6871) 评论(3) 推荐(2) 编辑
摘要: 题目:Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a funct... 阅读全文
posted @ 2014-07-22 00:40 爱做饭的小莹子 阅读(3300) 评论(0) 推荐(0) 编辑