#3 Easy O(n) O(n) Animated

Two Sum

Given an array of integers and a target, return indices of two numbers that add up to target.

LeetCode ↗
Approach: Hash Map — One Pass
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps