Domanda di colloquio di Oracle

Implement simple compression algorithm? Input: aaabbbccccc Output: a - 3 b - 3 c - 5