Two Sum

easy
Unit 5 · Trees0/3 to milestone

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