WekaIO interview question

Compress a string - aaabbaa -> a3b2a2