Remove Duplicates in Linked List
Given a singly linked list node
, remove nodes with duplicate values while maintaining relative order of the original list.
Constraints
n ≤ 100,000
wheren
is the number of nodes innode
https://binarysearch.com/problems/Remove-Duplicates-in-Linked-List
Examples
Example 1
Input
- node =
Output
- answer =
Example 2
Input
- node =
Output
- answer =
Leave a comment