Two Sum
easy#array#hashmap
Given an array of numbers, return indices of the two numbers such that they add up to a specific target.
Function Signature
export function twoSum(nums: number[], target: number): number[] { }Sample Tests
- Input: [2,7,11,15], target=9Expected: [0,1]