Palindrome of linklist

https://ide.codingblocks.com/s/57722 here i try to store frequency of each equivalent data present in each nodes of linklist if all are 1 means palindrome else false but it always gives me true value please debug my code

In your reverse function , you cannot return value like this

return head = p;

Simply return p;
https://ide.codingblocks.com/s/57747