Implemented exercise 2.7 - Check if a linked list is a palindrome.