What is my mistake

two test cases are failing why ?

hi @hhiteshbansal_40d12e2460a1738e
consider this input -
5
1 2 3 4 5
expected o/p - 1 3 5 2 4
ur o/p - 5 3 1 2 4

ur code is changing the order of o/p…
refer this code -->

ok got it thankyou :+1:

1 Like

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.