Given an array, move all zeros to the end while maintaining the relative order of non-zero elements. Do it in-place.
Input: nums = [0, 1, 0, 3, 12] Output: [1, 3, 12, 0, 0]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features