← 返回 jpmorgan 的题目列表HashMap Application (Leetcode Easy)
类型:online_judge
Write a function that given an array of integers and a target value, returns two numbers such that they add up to the target value. Assume each input would have exactly one solution, and you cannot use the same element twice.
Example
Input
[2, 7, 11, 15]\n9
Output
[0, 1]