My code is not working for even length linked list. Could you tell me what changes are required?
Palindrome Linked List
Do one simple thing. Take two linked lists. One will be the input one and the other will be the reversed list of the first one. Then start comparing one by one from the start of both the linked lists. And if at any point there is a mismatch, return false.