1 line Python solution


  • -9
    B
    class Solution:
        # @param {integer[]} nums
        # @return {integer[][]}
        def permuteUnique(self, nums):
            import itertools
            return list(set(itertools.permutations(nums)))

Log in to reply
 

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