Problem
Given thehead of a linked list, find all the values that appear more than once in the list and delete the nodes that have any of those values.
Return the linked list after the deletions.
Examples
Constraints
- The number of nodes in the list is in the range
[1, 10^5]. 1 <= Node.val <= 10^5