input: Write a python function to check if a linked list is a palindrome.
  assert LinkedList([3, 5, 6, 6, 5, 3]).checkPalindrome() == True
  assert LinkedList([1, 2, 3, 4, 5, 6]).checkPalindrome() == False
  assert LinkedList([1, 2, 2, 1]).checkPalindrome() == True
output: class Node:
      def __init__(self, value=0, next=None):
          self.value = value
          self.next = next
  
  class LinkedList:
      def __init__(self, values=None):
          self.head = None
          if values:
              self.head = Node(values[0])
              current = self.head
              for value in values[1:]:
                  current.next = Node(value)
                  current = current.next
  
      def checkPalindrome(self):
          # Function to reverse a linked list
          def reverse(head):
              prev = None
              current = head
              while current:
                  next_node = current.next
                  current.next = prev
                  prev = current
                  current = next_node
              return prev
          
          # Function to find the middle of the linked list
          def find_middle(head):
              slow = head
              fast = head
              while fast and fast.next:
                  slow = slow.next
                  fast = fast.next.next
              return slow
  
          if not self.head or not self.head.next:
              return True
  
          # Find the middle of the linked list
          middle = find_middle(self.head)
  
          # Reverse the second half of the linked list
          second_half = reverse(middle)
  
          # Compare the first half and the reversed second half
          first_half = self.head
          second_half_copy = second_half  # To restore the list later
  
          while second_half:
              if first_half.value != second_half.value:
                  return False
              first_half = first_half.next
              second_half = second_half.next
  
          # Restore the original list (optional)
          reverse(second_half_copy)
  
          return True