Subsets II

Given an integer array that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets.

Constraints

  • 1 <= nums.length <= 10
  • -10 <= nums[i] <= 10
Saving… · 2 lines
class Solution:
def findSubsetsWithDup(self, nums: List[int]) -> List[List[int]]:
Console

Click Run to execute sample tests.