Skip to content

Commit 64a6fff

Browse files
author
Li Li
committed
tiny touch on 283
1 parent 5be5709 commit 64a6fff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Algorithms Basics/Chapter 1. Array_String/283. Move Zeroes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public void MoveZeroes(int[] nums) {
1111
}
1212
int slow = 0;
1313
for (int fast = 0; fast < nums.Length; fast++) {
14-
if (nums[fast] != 0 && fast != slow) {
14+
if (nums[fast] != 0 && slow < fast) {
1515
while (slow < fast && nums[slow] != 0) {
1616
slow++;
1717
}

0 commit comments

Comments
 (0)