90. Subsets II
Description
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).
Note: The solution set must not contain duplicate subsets.
Constraints
Approach
Links
GeeksforGeeks
YouTube
Examples
Input: [1, 2, 2]
Output: [ [], [1], [1, 2], [2], [1, 2, 2], [2, 2] ]
Input: [4, 1, 2, 2]
Output: [ [], [1], [1, 2], [2], [1, 2, 2], [2, 2], [1, 2, 2, 4], [1, 2, 4], [1, 4], [2, 2, 4], [2, 4], [4] ]
Solutions
Follow up
Last updated
Was this helpful?