← ALL NOTES
Array

283. Move Zeroes

Push all zeros to the end while keeping the non-zeros in their original order, in place. The framing that makes this trivial is a "compaction" two-pointer: one pointer marks where the next non-zero…

Loading…