Apr 23, 2025
Example 1:
[2, 7, 11, 15], Target: 90 and 1 because 2 + 7 = 9.Example 2:
[3, 2, 4], Target: 61 and 2 because 2 + 4 = 6.i iterates over the array.j iterates from i + 1 to the end of the array.nums[i] + nums[j] == target.i and j once the pair is found.int i and int j for looping.i from 0 to nums.length - 1.j starting from i + 1 to nums.length.nums[i] + nums[j] == target is met:
i and j in an array arr.arr containing indices.arr of size 2.i and j.i and j.arr.