Two Sum

Problem: Two Sum

Given an integer array nums and an integer target, find two elements at different indices such that their sum equals target.

Return the two indices. The answer may be retur...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: