Two Sigma interview question

String compression