Two Sigma Interview Question

string permutations