my python


  • 0
    H
    class Solution(object):
        def moveZeroes(self, nums):
            """
            :type nums: List[int]
            :rtype: void Do not return anything, modify nums in-place instead.
            """
            for i in range(len(nums)):
                if nums[i] == 0:
                    nums.remove(0)
                    nums.append(0)
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.