why len(set(nums)) is wrong?
I have a same question @@
Because you need to change nums in place.
The elevator will check nums too see if it's content is correct, but will check only the first n (the number that you returned) elements.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.