All challenges
mediumtwo-pointers 10 XP per passing test
Move Zeros to the End
Problem
Given an array of integers, move all zeros to the end of the array. The relative order of the other elements should remain the same. For example, if the input array is [0, 1, 0, 3, 12], after calling your function, the array should be [1, 3, 12, 0, 0].
(run your code to see output)
Advertisement