Https://ide.codingblocks.com/s/174908

one test case fails and two give run time error

@Jitu748
hello jitendra,
please share your code using coding blocks ide

https://ide.codingblocks.com/s/174908 this is the link

@Jitu748
why are using doubly linked list?

you are checking even/ odd in incorrect way.refer below example for clarity

let say a is any variable then
if a&1==1 :
it means a is odd
else (i.e a&1==0 )
it means a is even

now modify your code accordingly.feel free to ask if you u still stuck somewhere

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.