I am learning backtracking and recursion and I am stuck at an algorithm for printing all the permutations of a string. I solved it using the bell algorithm for permutation b
Pseudo code:
String permute(String a[]) { if (a[].length == 1) return a[]; for (i = 0, i < a[].length(); i++) append(a[i], permute(a[].remove(i))); }