Available question text
Rearrange an even-length array that contains exactly half even and half odd numbers so that every even number occupies an even index and every odd number occupies an odd index. Return any ordering that satisfies this index-parity constraint (can be achieved in O(n) time and in-place by swapping mismatched pairs).
Related questions
Continue with questions that share topics or the same question type.
- Sort Array By Parity
Coding · Array · Sorting · Two Pointers
- GCD Sort of an Array
Coding
- Minimum Pair Removal to Sort Array I
Coding
- Minimum Pair Removal to Sort Array II
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 922. Sort Array By Parity II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source