CodingReported in a candidate post, Sep 2019
Minimum swaps to separate even and odd elements
Filed under Hike
The question
Given an array, find the minimum number of swaps needed to move all even elements to the beginning and all odd elements to the end.
No write-up yet. Related questions below have one.
Related Hike questions
Collected from public candidate posts and coding forums. Updated Nov 2026.