Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 283. Move Zeroes
Rearrange the array in-place so all zeros are moved to the end while preserving the relative order of non-zero elements, without using extra storage. Aim to minimize the number of writes/operations (stable partition / two-pointer pattern).
Asked at:
Meta
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late October, 2025
Microsoft
Mid-level
Late January, 2025
Meta
Senior
Q1) https://leetcode.com/problems/move-zeroes/description/ Followup: a) Move all zeros to the start of the array while maintaining the relative order of other numbers. b) Move all zeros to the start, negative numbers to the middle, and positive numbers to the end. The order within negative elements can be out of order. And the same for positive elements. This is similar to the Leetcode sort colors problem.
Early November, 2024
Meta
Mid-level
Move Zeroes - Move all zeroes to the end of the array while maintaining the relative order of non-zero elements
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.