Welcome to LeetCode Discuss.
This is a place to ask questions related to only OJ problems.
Please read the FAQ to help yourself making the best use of Discuss.
It seems the test cases of leetcode does not consider the inputs that have same numbers in the collection? For example, [1,3,3].
That Permutations 2!
Maybe in Permutations, "collection" should be replaced by "set".
I did not notice that there is a "permutations II"