Mphasis interview question

Run length encoding - a2b2c3