Algorithms - LeetCode 1 - Two Sum
Given: an array of integers nums and an integer target. Return the indices of two numbers in nums such that their sum is equal to target.
nums = [1,2,3,4,5], target = 3
Clarifications:
1. The task has only one correct pair of indices,
2. The same index cannot be used twice,
3. The order of indices in the answer does not matter.
Constraints:
1. 2 <= nums.length <= 10^2,
2. -10^9 <= nums[i] <= 10^9,
3. -10^9 <= target <= 10^9
Example:
Given: nums = [1,16,34,65], target = 66
Answer: [0,3]