Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 905. Sort Array By Parity
Partition the array so that all even numbers appear before all odd numbers, returning any arrangement that satisfies this; order within the even/odd groups doesn't matter. This is a straightforward in-place partitioning problem (O(n) time, constant extra space possible) over up to 5000 elements.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid January, 2025
Meta
Mid-level
segregate even and odd integers in a list to left and right side in place
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.