yesiamrajeev / Hacktoberfest2024

Do contribute to this repository and gain experience. Happy-Hacking.
27 stars 116 forks source link

Add : Remove Duplicates from Sorted List #209

Closed Amer-Mukhtar closed 3 weeks ago

Amer-Mukhtar commented 3 weeks ago

Closes issue #200 Problem Statement: Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well.

Example: Input: head = [1,1,2] Output: [1,2]