LinkedIn Interview Question

onsite: Permutations of a word