HackerRank Permutations of Strings in c problem solution - TheCScience