mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-27 06:03:39 +08:00
Update 0283.Move-Zeroes.md
else {j++} seems to be omitted
This commit is contained in:
@ -44,10 +44,8 @@ func moveZeroes(nums []int) {
|
|||||||
if nums[i] != 0 {
|
if nums[i] != 0 {
|
||||||
if i != j {
|
if i != j {
|
||||||
nums[i], nums[j] = nums[j], nums[i]
|
nums[i], nums[j] = nums[j], nums[i]
|
||||||
j++
|
|
||||||
} else {
|
|
||||||
j++
|
|
||||||
}
|
}
|
||||||
|
j++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user