Missing test cases

  • 0

    I don't think the way this problem is described matches what the solutions should be.
    The test case that seems to be missing is when the duplicates are separated by a large gap.

    Test case: [1,2,3,4,2,2,4,3,1]
    Leetcodes expected answer: [1,2,3,4,4,3,1]
    True answer, if all duplicates are removed: []

  • 0

    the title of this question is: Remove Duplicates from Sorted List II.
    test case [1,2,3,4,2,2,4,3,1] is not a sorted list.
    In order to ensure the order of the list under the premise, only need to compare the latter element and the previous element is the same

  • 0

    @Loatheb oooh gotcha, thanks! the question is much easier than I thought =D

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.