Check Palindrome Linked List

i can think of a approach which runs on O(n) time complexity and Space Complexity O(n) can i solve this question in O(1) space?

https://ide.codingblocks.com/s/308074 my code is giving true for all inputs can u check where i went wrong

hi @tusharjha9835 you can refer to this for different approaches

what about my code it is giving wrong answer?

hi @tusharjha9835 you already passed all the test cases, do you still need any help?

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.