@@ -0,0 +1,697 @@
+import java.util.*;%0Apublic class Solution %7B%0A    public List%3CList%3CInteger%3E%3E result = new ArrayList%3CList%3CInteger%3E%3E();%0A    public List%3CList%3CInteger%3E%3E subsets(int%5B%5D S) %7B%0A        Arrays.sort(S);%0A        List%3CInteger%3E valuelist = new ArrayList%3CInteger%3E();%0A        this.dfs(S, valuelist);%0A        return result;%0A    %7D%0A%0A    public void dfs(int%5B%5D S, List%3CInteger%3E valuelist) %7B%0A        this.result.add(valuelist);%0A        if (S.length == 0) %7B%0A            return;%0A        %7D%0A        for (int i = 0; i %3C S.length; i++) %7B%0A            ArrayList%3CInteger%3E newList = new ArrayList%3CInteger%3E(valuelist);%0A            newList.add(S%5Bi%5D);%0A            dfs(Arrays.copyOfRange(S, i+1, S.length), newList);%0A        %7D%0A    %7D%0A%7D%0A

Revert "remove subsets for xu qian"