My test case 0 is failing kindly look into the code

kindly look in my code my test case 0 is failing

hello @av8055

relative order among even and odd must remain same which u r not taking care of

for example->

7
1 2 3 4 5 6 7
Output
1 3 5 7 2 6 4
expected
1 3 5 7 2 4 6

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.