Persistent Systems Interview Question

Permutation of string program