X Interview Question

Permutation of string; Sort array of strings