Remove Duplicates from Sorted List
Here is the link to the problem: Remove duplicates (Linked List). 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. Examples: Example 1: Input: head = [1,1,2] Output: [1,2] Example 2: Input: head = [1,1,2,3,3] Output: [1,2,3] My Solution # Definition for singly-linked list. # class ListNode(object): # def __init__(self, val=0, next=None): # self....