728x90
https://leetcode.com/problems/move-zeroes/
class Solution:
def moveZeroes(self, nums: List[int]) -> None:
count = nums.count(0)
if count == len(nums):
return
for i in range(count):
nums.remove(0)
nums.append(0)
728x90
'IT > 코딩테스트' 카테고리의 다른 글
[Leetcode] 26. Remove Duplicates from Sorted Array (0) | 2023.08.24 |
---|---|
[Leetcode] 1068. Product Sales Analysis I (0) | 2023.08.24 |
[Leetcode] 1378. Replace Employee ID With The Unique Identifier (0) | 2023.08.23 |
[Leetcode] 595. Big Countries (0) | 2023.08.22 |
[Leetcode] 584. Find Customer Referee (0) | 2023.08.22 |