Easy and short recursive solution, beats 96%.
Intuition\nThe idea is to apply a recursive approach. If the first and the second values are the same, the first value is not unique and should be dropped from 
# Intuition\nThe idea is to apply a recursive approach. If the first and the second values are the same, the first value is not unique and should be dropped from the list.\n\nTo get the result, we need to apply our function to the remainder of the list:\n\nIf the first and the second values are different, we should keep the first value and connect it to the result of the function applied to the remainder of the list:\n```\nhead.next = self.deleteDuplicates(head.next)\n```\n\n# Approach\n**Base Case::** If the list is empty, we should return an empty list.\n\n**Recursive Step:** Check if the first value in the list is unique or should be dropped, and make the recursive call for the remainder.\n- If the first value is not unique (it means that it is equal to the second value), move the head pointer forward until we reach a different value (thus dropping the first value).\n- The result will be the recursive call for the remainder of the list:\n\n```\ncur_val = head.val\nif head.next and head.next.val == cur_val:\n    while head and head.val == cur_val:\n        head = head.next \n    return self.deleteDuplicates(head)\n```\n- If the first value is unique, we just keep it and link it to the result of the recursive call applied to the remainder of the list:\n\n```\nelse:\n    head.next = self.deleteDuplicates(head.next)\n    return head\n```\n\n# Complexity\n- Time complexity:\n****O(n)**** because each node is processed exactly once.\n\n- Space complexity:\n**O(n)** due to the call stack in the worst case scenario.\n\n# Code\n```\n# Definition for singly-linked list.\n# class ListNode:\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         self.next = next\nclass Solution:\n    def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListNode]:\n        if not head:\n            return head\n        cur_val = head.val\n        if head.next and head.next.val == cur_val:\n            while head and head.val == cur_val:\n                head = head.next \n            return self.deleteDuplicates(head)\n        else:\n            head.next = self.deleteDuplicates(head.next)\n            return head\n```
['Recursion', 'Python3']