Back to the Problem
Copy the non-zero elements forward in order, then fill the tail with zeros.
Complexity: O(N)