###### LeetCode 1: Two Sum

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 two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based.

You may assume that each input would have exactly one solution.

Input:numbers={2, 7, 11, 15}, target=9

Output:index1=1, index2=2

LeetCode对于性能要求比较高，因此对于此类查找问题，用hashmap是减少时间复杂度的一个方法。

#### [LeetCode]1 Two Sum(C++,Python实现)

2014-05-16 21:17:33

#### 【LeetCode】LeetCode——第1题：Two Sum

2016-01-04 17:01:58

#### leetcode 1. Two Sum -----java

2016-06-20 19:52:04

#### leetcode 刷题题解（c++） 1.Two Sum （hash表，排序+二分查找）

2016-07-24 20:59:08

#### leetcode【1+167 Two Sum 系列】【python】

2016-09-01 19:31:36

#### LeetCode题解--1. Two Sum(和为S的两个数字)

2016-01-27 22:32:25

#### [C++]LeetCode 1: Two Sum（无序数组求指定和）

2015-04-28 20:16:29

#### [leetcode]1. Two Sum -- JavaScript 代码

2016-09-04 15:23:20

#### [LeetCode][1]Two Sum解析 -Java实现

2016-06-01 16:23:30

#### LEETCODE 1.Two Sum （python实现）

2016-05-22 23:25:15

## 不良信息举报

LeetCode 1: Two Sum