segmentation fault
***************palindrome ll
hello @ayu2321

ur rev function is revrsing the same linked list.
follow this->
make copy of the original list and then reverse it and then compare
temp is again containing same address , so ur reverse function will reverse original list only.
make a copy of the list first
first call reverse function .
and then try to print both the list ,u will get the difference
yes got the difference but i am unable to rectify it please help
its easy na,
u just have to crete a copy of link list .
how we can make copy?
simply iterate the given list, and use its node data to create a new list.
now u have two different list.
revere any of them .
and then compare for palindrome
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.
