Skip to content

Code challenge

Two Sum

Problem

Given an array of integers `nums` and an integer `target`, return the indices of the two numbers that add up to `target`. Exactly one solution exists; you may not use the same element twice.
Editor · javascript4 lines · 54 chars
Back to topic
Two Sum — Arrays & Strings · Aevrofy