Driver program to test above function
llist = LinkedList ( ) NEW_LINE llist . head = Node ( ' a ' ) NEW_LINE llist . head . next = Node ( ' bc ' ) NEW_LINE llist . head . next . next = Node ( " d " ) NEW_LINE llist . head . next . next . next = Node ( " dcb " ) NEW_LINE llist . head . next . next . next . next = Node ( " a " ) NEW_LINE print " true " if llist . isPalindrome ( ) else " false " NEW_LINE