Why python code using set was not accepted?

  • 0

    As the title, I believe the code below was correct but why it was not accepted?


    def removeDuplicates(self, nums):
        return len(set(nums))


Log in to reply

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