1836. Remove Duplicates From an Unsorted Linked List
Last updated
Was this helpful?
Last updated
Was this helpful?
https://leetcode.com/problems/remove-duplicates-from-an-unsorted-linked-list
Given the head
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.
Example 1:
Example 2:
Example 3:
Constraints:
The number of nodes in the list is in the range [1, 105]
1 <= Node.val <= 105