01.03 · Problem
Two Sum
This problem is part of solulu Pro
Given an array of integers nums and an integer target, return the indices of the two different elements that add up to target. Exactly one such pair exists. You may return the two indices in any order.
Lifetime ₹2,000 ₹1,000 · Beta offer
Item 3 of 9 · updated 2026-10-12