VisualizeCode.Dyev
Runner ready

Easy · Arrays & Hash Map

Two Sum

Find the pair of indices whose values add up to a target.

Reference test case

Input: [2, 7, 11, 15], target = 9
Expected output: [0, 1]