Merge b540dbfdd12e2f058edb47925e58736372f9c261 into b70121d377cb6005eb65f12b098cd5decd905669
This commit is contained in:
commit
6551a578fd
@ -20,7 +20,7 @@
|
||||
public ArrayList<Integer> FindNumbersWithSum(int[] nums, int target) {
|
||||
int i = 0, j = nums.length - 1;
|
||||
while (i < j) {
|
||||
int cur = nums[i] + array[j];
|
||||
int cur = nums[i] + nums[j];
|
||||
if (cur == target)
|
||||
return new ArrayList<>(Arrays.asList(nums[i], nums[j]));
|
||||
if (cur < target)
|
||||
|
Loading…
x
Reference in New Issue
Block a user