Send the Solution

Please send me the solution of the last question you asked in the video of CRX-Get SubSequences

import java.util.ArrayList;

public class SubSequence {
public static ArrayList getSS(String str){
if(str.length()==0){
ArrayList baseResult = new ArrayList<>();
baseResult.add("");
return baseResult;
}
String remstr = str.substring(1);
char cc = str.charAt(0);
int ch = (int)cc;
ArrayList result = new ArrayList<>();
ArrayList recResult = getSS(remstr);
for(int i =0;i<recResult.size();i++){
result.add(recResult.get(i));
result.add(cc+recResult.get(i));
result.add(ch + recResult.get(i));
}

    return  result;
}
public static void main(String[] args){
    ArrayList<String> result = getSS("ab");
    System.out.println(result);
}

}