Simple python solution (DFS).
\nclass Solution(object):\n    def subsetsWithDup(self, nums):\n        ret = []\n        self.dfs(sorted(nums), [], ret)\n        return ret\n    \n    def dfs
```\nclass Solution(object):\n    def subsetsWithDup(self, nums):\n        ret = []\n        self.dfs(sorted(nums), [], ret)\n        return ret\n    \n    def dfs(self, nums, path, ret):\n        ret.append(path)\n        for i in range(len(nums)):\n            if i > 0 and nums[i] == nums[i-1]:\n                continue\n            self.dfs(nums[i+1:], path+[nums[i]], ret)\n```
['Backtracking', 'Depth-First Search', 'Python']