Easy & Clear Solution Python3
\n\n# Code\n\nclass Solution:\n    def subsetsWithDup(self, nums: List[int]) -> List[List[int]]:\n        nums = sorted(nums)\n        res = []\n        self.ba
\n\n# Code\n```\nclass Solution:\n    def subsetsWithDup(self, nums: List[int]) -> List[List[int]]:\n        nums = sorted(nums)\n        res = []\n        self.backtracking(res,0,[],nums)\n        return res\n    def backtracking(self,res,start,subset,nums):\n        res.append(list(subset))\n        for i in range(start,len(nums)):\n            if i > start and nums[i] == nums[i-1]:\n                continue\n            self.backtracking(res,i+1,subset+[nums[i]],nums)\n\n```
['Python3']