Added algorithm for all permutations of a string.