Linkage
https://leetcode.com/problems/permutations/description/
Code
1 | class Solution: |
FollowUp
https://leetcode.com/problems/permutations-ii/description/
In this implementation, we need the preprocessing to the original array, which means we should count the number of each elements.
1 | import java.util.HashMap; |