Check whether a linked list is a palindrome

Given a linked list, find out whether it is a palindrome or not

One Comment

  1. techie007 says:

    1. Find the middle of the linked list as M in O(n) time
    2. Reverse the linked list from middle M and the head of the reversed half be E.
    3. Check whether Linked List with head E is same as linked list from start
    4. reverse once again the linked list with head E and join to creare the original linked list

Leave a Reply