Palindrome in linked list

can you provide hint for this problem?

Hey @shubhangis248 there are three methods from which you can approach this problem. They are listed below

  1. Using stack
    Put every node in stack and pop every element one by one and check

  2. Reverse linked list
    Reverse linked list and then check it one by one

  3. Using recursion


what is wrong in this code? it is showing true in not palindrome as well

can you tell what is wrong in my code?