Added string permutations algorithm