90. Subsets II
# Medium
For this problem, [1, 4]
and [4, 1]
are the same subsets
Solution:
Sort the list to let same numbers be neighborhood.
Very similar to #78.
Add
if
inside the adding level process.
Time complexity = T_mergeSort + T_subsets =
Space complexity =
Last updated
Was this helpful?