mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
Merge pull request #46 from j3rrywan9/master
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