Remove Duplicates from Sorted List
Try to solve the Remove Duplicates from Sorted List problem.
We'll cover the following
Statement
Given the Head
of a sorted linked list, remove all duplicates such that each element appears only once, and return the list in sorted order.
Constraints:
n
, where n
is the number of nodes in the list.Node.Data
The list is guaranteed to be sorted in ascending order.
Examples
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.