check if a linked list is a palindrome

simple for doubly linked list
here we only consider singly linked list