Problem

Return array with all zeros moved to the end, others order preserved.

Examples

  • moveZerosEnd([0, 1, 0, 2]) -> [1, 2, 0, 0]
Compile and test (Ctrl+Enter)