Exercises/#1 Two Sum
#1

Two Sum

EasyπŸ“¦ Arrays
50 XP

Problem

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.

Examples

Input: nums = [2,7,11,15], target = 9
Output: [0,1]

Input: nums = [3,2,4], target = 6
Output: [1,2]
hash-maparraytwo-pointer
AI Assistantβ€” powered by AI

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

1 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features