Two Sum

easy
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 6. Everything before it counts as cleared.

Given a list nums and a target, return the indices [i, j] (with i < j) of the two numbers that add up to target. Exactly one solution exists. Aim for O(n).

#hash-map#arrays2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Two Sum · TechGradify