HashMap Application (Leetcode Easy)

Write a function that given an array of integers and a target value, returns two numbers such that they add up to the target value. Assume each input would have exactly one solution, and you cannot us...

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: