can you provide hint for this problem?
Palindrome in linked list
Hey @shubhangis248 there are three methods from which you can approach this problem. They are listed below
-
Using stack
Put every node in stack and pop every element one by one and check -
Reverse linked list
Reverse linked list and then check it one by one -
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?