Evens Before Odds
Microsoft interview questions · Medium · Coding round · 6 tests
Count the minimum swaps needed to group every even number before every odd number when any two indices may be swapped.
The full question, tests and reference solution are available with a plan that includes Microsoft.
Run your code with Ctrl+Enter to see results.