Added alternative solution for string permutations