modifying algorithm to generate unique permutations in a string that contains duplicates

visit shbcf.ru