not able to pass test case 0 and 3
link to my code
Even after odd linked list
Hello @abhiuday102,
Your code is failing for test cases like:
Example 1:
5
1 3 5 7 9
Expected Output:
1 3 5 7 9
Your Output:
9 7 3 1 5
Example 2:
5
1 2 5 10 9
Expected Output:
15 9 2 10
Your Output:
9 5 1 2 10
Hope, it would help.
Give a like, if you are satisfied.
1 Like
ok got it that we have to maintain the order as well
thank you
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.