easy Arrays & Hashing
Two Sum
Given an array of integers `nums` and an integer `target`, return the indices of the two numbers that add up to `target`. Each input has exactly one solution, and you may not use the same element twice. Example: nums = [2, 7, 11, 15], target = 9 → [0, 1] (because 2 + 7 = 9).
runs in your browser