摘要: Problem statement: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target n 阅读全文
posted @ 2017-05-20 20:39 蓝色地中海 阅读(169) 评论(0) 推荐(0)
摘要: Problem statement: 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 阅读全文
posted @ 2017-05-20 20:25 蓝色地中海 阅读(155) 评论(0) 推荐(0)
摘要: Problem statement: 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 whic 阅读全文
posted @ 2017-05-20 10:10 蓝色地中海 阅读(144) 评论(0) 推荐(0)
摘要: Problem statement: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each 阅读全文
posted @ 2017-05-20 09:34 蓝色地中海 阅读(131) 评论(0) 推荐(0)
摘要: Problem statement: Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Examp 阅读全文
posted @ 2017-05-20 00:09 蓝色地中海 阅读(173) 评论(0) 推荐(0)