Bloomberg interview question

compress string