Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target. You may assume exactly one solution exists.
Input: nums = [2,7,11,15], target = 9 Output: [0,1] Input: nums = [3,2,4], target = 6 Output: [1,2]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features