wrote solution to check if 2 strings are permutations of each other