82. Remove Duplicates from Sorted List II
# medium
Solution 1(complicated version):

Solution 2(easy version):

If deleting all duplicates required, we can record the value and delete them in on time; If deleting all duplicates except itself required, we can keep first one and delete others.
Last updated