WhiteHat Jr Interview Question

compress a given string