input: Write a python function to check if a linked list is a palindrome and remove duplicates from a linked list.
  assert isPalindrome(LinkedList([1, 2, 2, 1])) == True
  assert isPalindrome(LinkedList([1, 2, 3, 2, 1])) == True
  assert isPalindrome(LinkedList([1, 2, 3, 4])) == False
  assert removeDuplicates(LinkedList([1, 2, 2, 3, 4, 4, 5])).to_list() == [1, 2, 3, 4, 5]
  assert removeDuplicates(LinkedList([1, 1, 1, 1, 1])).to_list() == [1]
  assert removeDuplicates(LinkedList([1, 2, 3, 4, 5])).to_list() == [1, 2, 3, 4, 5]
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:
              for value in values:
                  self.append(value)
  
      def append(self, value):
          if not self.head:
              self.head = Node(value)
          else:
              current = self.head
              while current.next:
                  current = current.next
              current.next = Node(value)
  
      def to_list(self):
          result = []
          current = self.head
          while current:
              result.append(current.value)
              current = current.next
          return result
  
  def isPalindrome(linked_list):
      # Convert linked list to list
      lst = []
      current = linked_list.head
      while current:
          lst.append(current.value)
          current = current.next
      # Check if list is palindrome
      return lst == lst[::-1]
  
  def removeDuplicates(linked_list):
      if not linked_list.head:
          return linked_list
  
      current = linked_list.head
      seen = set([current.value])
      while current.next:
          if current.next.value in seen:
              current.next = current.next.next
          else:
              seen.add(current.next.value)
              current = current.next
      return linked_list