Monday, December 12, 2011

Palindromic Linked List

Check if a singly LL is a palindrome or not.The code should consider both linked lists with even and odd number of elements.

http://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/

Variation:
Linked List is reverse of other list or not.
Given two linked list. We have to find that whether the data in one is reverse that of data in other. No extra space is to be used and traverse the lists only once

Same as Palindrome Linked List question except here we need not stop at the middle node in the recursion.

No comments:

Post a Comment