Asked • 06/08/21

Find the sum of two elements in a set to equal the target value.

Find the sum of two elements in a set to equal the target value.


Input: nums = [2,7,11,15], target = 9

Output: [0, 1]

Output : Because nums[0] + nums[1] == 9, we return[0, 1].

1 Expert Answer

By:

Ralph W. answered • 06/08/21

Tutor
4.9 (144)

From Syntax to Systems: Professional Tutoring in Computer Programming

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.