(Question Closed by myself)Is this problem means adjacent duplicate elements need to be deleted?

  • 0

    If the input is {1,2,1,3}, i used the one of accepted solutions displayed in discuss forum and the output is

    My code outputs {1,2,3}.

    And i didn't see any adjacent info in the problem.

    Lol, i forgot the input is a sorted array. I realized this after a short rest.

Log in to reply

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