Problem
Return the indices of the two numbers that add up to the target.
Example 1
Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Constraints
- 2 <= nums.length <= 10^4
- -10^9 <= nums[i] <= 10^9
Notes
- Focus on the underlying hash table pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.