Skip to content
Veltoryx Technologies
ProProblem 6● EasyLeetCode #283 ↗2 min readUpdated 30 October 2026

Move Zeroes

Push every zero to the end in place, keeping the other numbers in order, with a write pointer and a read pointer.

01The problem

Move all 0s in nums to the end in place (no new array), keeping the non-zero numbers in their original order.

InputOutput
[0, 1, 0, 3, 12][1, 3, 12, 0, 0]
[0][0]

Loading the rest of the lesson…