Move Zeroes Problem
Anonymous User
64

I have written following code. not able to understand why its not giving desired output in leetcode when its giving in my local system.

Link to the problem: https://leetcode.com/problems/move-zeroes/
'''

def moveZeroes( nums):

countzero=nums.count(0)

nums.sort()
nums=nums[countzero:len(nums)]
print(nums)
for i in range(countzero):
    nums.append(0)

return nums
Comments (1)