Problem is busted?


  • -1
    A
    def move_zeroes(nums)
        nums.each_with_index do |num, index|
            if num == 0
                nums.delete_at(index)
                nums.push(num)
            end
        end
        nums
    end
    

    works in test case but fails in solution submitting.


Log in to reply
 

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