implemented whether two strings are permutations of each other