Update 57.1 和为 S 的两个数字.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
CyC2018
2026-10-23 04:39:44 +08:00
co-authored by Claude Fable 5
parent 6391ea8c1b
commit 617b68bad0
+1 -1
View File
@@ -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)