A number is Palindrome if it reads same from front as well as back.For example,
2332 is palindrom number as its read same from both sides.
Linked List can also be palindrome if they have the same order when it traverse from forward as well as backward.
It can be done with using three different methods:
Using stack
Using string
By reversing the list
Using Stack:
Algorithm
Traverse the linked list and push the value in Stack.
Now, again traverse the linked list and while doing so pop the values...
Published on November 02, 2020 23:19