Rearrange array such that odd numbers occupy odd positions and even occupy even
Filed under GE
The question
Rearrange an array of numbers so that even numbers occupy even indices and odd numbers occupy odd indices, maintaining their relative order without using extra space.
No write-up yet. Related questions below have one.
Collected from public candidate posts and coding forums. Updated Nov 2026.