KREVERSE QUESTION IN HACKERBLOCKS https://ide.codingblocks.com/s/77773

Test Case was not passing. I have tried with every possible input and I am getting correct output. So Kindly check the test cases, as the question seems to be pretty simple with no successful submission. MY code is written in https://ide.codingblocks.com/s/77773

Hi
What if:
9 1
9 4 1 7 8 3 2 6 5
Your code output is 7 1 4 9 1 6 2 3 8
How come? The linked list should not even change in this case.
Pls look into it

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.