code: def remove_dups(head):
      """
      Time Complexity: O(N)
      Space Complexity: O(N)
      """
      hashset = set()
      prev = Node()
      while head:
          if head.val in hashset:
              prev.next = head.next
          else:
              hashset.add(head.val)
              prev = head
          head = head.next
  
label_desc: Use image node_id 1 for calling a global function with example usage: remove_dups(head) without return types