From 77f2319e35f4cec67f73f158918277e82a0bda7b Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Fri, 23 Oct 2026 04:39:45 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Leetcode=20=E9=A2=98=E8=A7=A3=20-=20?= =?UTF-8?q?=E5=8F=8C=E6=8C=87=E9=92=88.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- notes/Leetcode 题解 - 双指针.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/notes/Leetcode 题解 - 双指针.md b/notes/Leetcode 题解 - 双指针.md index 1dbd48df..69678fa2 100644 --- a/notes/Leetcode 题解 - 双指针.md +++ b/notes/Leetcode 题解 - 双指针.md @@ -81,7 +81,7 @@ Explanation: 1 * 1 + 2 * 2 = 5 if (target < 0) return false; int i = 0, j = (int) Math.sqrt(target); while (i <= j) { - int powSum = i * i + j * j; + long powSum = (long) i * i + (long) j * j; if (powSum == target) { return true; } else if (powSum > target) { @@ -212,8 +212,6 @@ public void merge(int[] nums1, int m, int[] nums2, int n) { while (index2 >= 0) { if (index1 < 0) { nums1[indexMerge--] = nums2[index2--]; - } else if (index2 < 0) { - nums1[indexMerge--] = nums1[index1--]; } else if (nums1[index1] > nums2[index2]) { nums1[indexMerge--] = nums1[index1--]; } else {