for below mentioned string permutation algo or any other recursive algo, what is max size of string supported if i have 1 GB of dedicated memory available.
public void permutate(String prefix, String word){
if(word.length() <= 1){
System.out.println(prefix + word);
} else{
for (int i = 0; i < word.length(); i++) {
String temp = word.substring(0,i) + word.substring(i+1);
permutate(prefix + word.charAt(i), temp);
}
}
}
public void permutate(String word){
permutate("", word);
}