mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2026-03-13 10:02:05 +08:00
chore: remove unnecessary else branch
This commit is contained in:
@@ -9,10 +9,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