Two Sigma interview question

A string manipulation programming problem