Skip to content

Commit f6c2333

Browse files
committed
auto commit
1 parent 01f9a92 commit f6c2333

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notes/Leetcode 题解 - 双指针.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Output: [1,2,2,3,5,6]
209209
public void merge(int[] nums1, int m, int[] nums2, int n) {
210210
int index1 = m - 1, index2 = n - 1;
211211
int indexMerge = m + n - 1;
212-
while (index1 >= 0 || index2 >= 0) {
212+
while (index2 >= 0) {
213213
if (index1 < 0) {
214214
nums1[indexMerge--] = nums2[index2--];
215215
} else if (index2 < 0) {

0 commit comments

Comments
 (0)