Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The description is a tad confusing. You tell us to remove duplicates. To me that means remove all but one of the duplicates so that the resulting array doesn't have any duplicates in it:

       [1,2,3,2,4,6,2,6,7]
    //        ^     ^ ^    these are duplicates of other numbers
    

    But that's not what you meant, judging by the tests. Could you rephrase to make this clearer?

    Also, you could add an example test for the example you gave in the description.