remove-duplicates-from-sorted-list Jan 24, 2024 class Solution { fun deleteDuplicates(head: ListNode?): ListNode? { var cur = head while(cur != null) { var next = cur.next while(cur.`val` == next?.`val`) { cur.next = next.next next = cur.next } cur = cur.next } return head } }