#99. zeroFront
zeroFront
Background
Description
Return an array that contains the exact same numbers as the given array, but rearranged so that all the zeros are grouped at the start of the array. The order of the non-zero numbers does not matter. So {1, 0, 0, 1} becomes {0 ,0, 1, 1}. You may modify and return the given array or make a new array.
Format
Input
Output
Samples
[1 0 0 1]
[0, 0, 1, 1]
[0 1 1 0 1]
[0, 0, 1, 1, 1]
[1 0]
[0, 1]
Limitation
1s, 1024KiB for each test case.