Even after odd linked list

https://ide.codingblocks.com/s/425844 why is this approach wrong? it doesnt pass 2 test cases.

Hello @maazsaad if you will use the inbuilt list then you will not be able to maintain the relative order.
i.e for this test case:
4
1 2 4 5 the output should be :
1 5 2 4.
the number which have arrived first should be printed first.

https://ide.codingblocks.com/s/425844 im unable to figure out how to manage the order of odd numbers.

@maazsaad check this:

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.