Setup Array
Cleanup Controls
Array Visualization
Original Array:
New Array:
Colors: Blue = Left, Purple = New Position, Red = Zero, Yellow = Copying, Green = Copied
Copy Over is a data cleanup algorithm that removes zeros by copying non-zero elements to a new array.
How it works:
Time Complexity: O(n) - single pass through the array