Push Zeroes to the End

L3 Easy Two Pointers
Concept
A slow "write" pointer and a fast "read" pointer let you compact an array in place: every pass, copy the value forward, and only advance the write pointer when you keep a value.
Given an array nums, move every 0 to the end of the array while keeping the relative order of all non-zero numbers. Modify the array in place; return nothing.
Examples
▸ nums = [0, 1, 0, 3, 12]
→ [1, 3, 12, 0, 0]
▸ nums = [0, 0, 1]
→ [1, 0, 0]
▸ nums = [1, 2, 3]
→ [1, 2, 3]
Progressive Hints
Hint 1 · Nudge
Write the non-zero values up front in order; the leftover slots are zeroes by default.
Hint 2 · Plan
Keep a pointer for where the next non-zero value should land. Loop through the array: whenever you meet a non-zero, put it at that pointer and advance the pointer. After the loop, fill every slot from the pointer to the end with 0. Modify the array in place and return nothing.
Hint 3 · Approach
write = 0. For each n in nums: if n does not equal 0, set nums[write] = n and write = write + 1. Then fill every slot from write onward with 0. Return nothing.
Output
// Run your code to see the output here.