Is palindrome link list

the code is working but is not passing any of the test case. can you pls see to it and help me correct it.

Save your code on ide.codingblocks.com and share its link.

If linked list is palindrome, you should print “true” and not 1. Your code is print 1 or 0 as output. You have to print “true” or “false” ie(string).
Also your code is giving output as 1 for all cases.
Dry run your code for different cases and check.

I have solved that string problem and I also tried dry run on my code but I ma unable to understand why is it giving true for every input

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.