168. move zeros

medium  - accepted / - tried

Given an array of integers, move zeros to the end while keeping the order of the rest.

You should make the in-place change.

const list = [1,0,0,2,3]
moveZeros(list) 
console.log(list) // [1,2,3,0,0]

What is the time & space complexity of your approach?

Bugfree ordinary solution is better than buggy fancy ones.

(131)