mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-10 21:40:51 +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 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