From f6c2333822673d42acd538bbced5c12873ed95aa Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Mon, 19 Apr 2021 01:03:52 +0800 Subject: [PATCH] auto commit --- notes/Leetcode 题解 - 双指针.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/Leetcode 题解 - 双指针.md b/notes/Leetcode 题解 - 双指针.md index 4e9fe9ed..1dbd48df 100644 --- a/notes/Leetcode 题解 - 双指针.md +++ b/notes/Leetcode 题解 - 双指针.md @@ -209,7 +209,7 @@ Output: [1,2,2,3,5,6] public void merge(int[] nums1, int m, int[] nums2, int n) { int index1 = m - 1, index2 = n - 1; int indexMerge = m + n - 1; - while (index1 >= 0 || index2 >= 0) { + while (index2 >= 0) { if (index1 < 0) { nums1[indexMerge--] = nums2[index2--]; } else if (index2 < 0) {