83 Remove Duplicates from Sorted List
1. Question
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.
For example,
Given1->1->2
, return1->2
.
Given1->1->2->3->3
, return1->2->3
.
2. Implementation
3. Time & Space Complexity
时间复杂度O(n), 空间复杂度O(1)
Last updated