Language: Python 3
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 input would have exactly one solution (in the easy versions), and you may not use the same element twice.
For the hard version, you can have multiple solutions. Each solution must be a unique pair of numbers. Additionally, you cannot fit the whole array into memory, and you cannot assume that the array is sorted.
See TwoSumTooLarge.py for the hard version. The easy version is in TwoSum.py and TwoSumSorted.py.