Even after odd problem

can u see why test case-3 is getting failed

debug your code for
7
1 2 4 3 8 5 6
ans shd be
1 3 5 2 4 8 6