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],
  [1],
  [1,2,2],
  [2,2],
  [1,2],
  []
]
  • [x] for (int i = startIndex; i < nums.length; i++) {
            if \(**i != startIndex** && nums\[i\] == nums\[i-1\]\) {
                continue;
            }
    

results matching ""

    No results matching ""