@@ -0,0 +1,784 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class _0090SubsetsII %7B%0A  public List%3CList%3CInteger%3E%3E subsetsWithDup(int%5B%5D nums) %7B%0A    Arrays.sort(nums);%0A    List%3CList%3CInteger%3E%3E res = subsetsWithDup(nums, 0, new ArrayList%3C%3E());%0A    res.add(new ArrayList%3C%3E());%0A    return res;%0A  %7D%0A%0A  private List%3CList%3CInteger%3E%3E subsetsWithDup(int%5B%5D nums, int start, List%3CInteger%3E l) %7B  %0A    List%3CList%3CInteger%3E%3E res = new ArrayList%3C%3E();%0A    for (int i = start; i %3C nums.length; i++) %7B%0A      if (i %3E start && nums%5Bi%5D == nums%5Bi - 1%5D) %7B%0A        continue;%0A      %7D%0A      l.add(nums%5Bi%5D);%0A      res.add(new ArrayList%3C%3E(l));%0A      if (i %3C nums.length - 1) %7B%0A        res.addAll(subsetsWithDup(nums, i + 1, l));%0A      %7D%0A      l.remove(l.size() - 1);%0A    %7D%0A    return res;%0A  %7D%0A%7D%0A

Add _0090SubsetsII