Infosys Interview Question

compress aabbbcc as a2b3c2