My code is not passing 2 test cases!

i have wriiten the code for odd then even printing of the linklist elements but my code is not passing 2 test cases.
please explain what is the error in the code.

YOur linked list is formed in reverse fashion for both odd and even!
don’t distort the order!
eg: this test
7
1 2 3 4 5 6 7
gives output as 7 5 3 1 6 4 2
but output should be 1 3 5 7 2 4 6

ok got it, corrected my mistake , thanks for the help!

Great! mark doubt as resolved if satisfied.