EVEN-After-ODD-uestion

3 out of 4 test case passed,
where i am wrong

Hello @officialharshit1996 please wait i am checking your code:

Hello @officialharshit1996 your logic is wrong as it it not maintaining the relative order:
dry run for this test case:
4
1 2 4 5
the output should be: 1 5 2 4
if you have any doubt you can ask here:
Happy Learning!!

i am not getting how to maintain relative order

@officialharshit1996 shouldi give you my code which is way more easier then yours:
Here for your reference i am attaching:
https://ide.codingblocks.com/s/408283
if you have any doubt you can ask here:
Happy Learning!!

in place is not possible, what i am trying to say that you have created two additional linked list to store a even and odd

given a linked list- want to do some operation that change element in a given linked list

@officialharshit1996 take help from this code then:

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.