First Steps Stage 1 of 3
Appearance
Palette
Start each problem at
Write shows nothing of the solution until you ask. Kept on this device, not in your account.
Easy Hash map · O(n) time, O(n) space · LeetCode ↗
Find the two numbers in nums that add up to target, and return their indices.
The practice panel runs the code in your browser, so it needs JavaScript.