90 Subsets II
90. Subsets II
1. Question
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.
For example,
Ifnums=[1,2,2]
, a solution is:
2. Implementation
(1) Backtracking
3. Time & Space Complexity
Backtracking: 时间复杂度O(2^n), 空间复杂度O(2^n)
Last updated