mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
@ -44,10 +44,8 @@ func moveZeroes(nums []int) {
|
||||
if nums[i] != 0 {
|
||||
if i != j {
|
||||
nums[i], nums[j] = nums[j], nums[i]
|
||||
j++
|
||||
} else {
|
||||
j++
|
||||
}
|
||||
}
|
||||
j++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user