Given a set of characters represented by a String, return a list containing all subsets of the characters.
Assumptions:
There are no duplicate characters in the original set.
Examples
Set = "abc", all the subsets are [“”, “a”, “ab”, “abc”, “ac”, “b”, “bc”, “c”]
Set = "", all the subsets are [""]
Set = null, all the subsets are []
Approach: DFS, with n levels, each level whether add the character or not.
public class Solution{
public List<List<characters>> subsets(String ) {
}
}