Pregunta de entrevista de Statusneo

Write a string compression algo had some patterns inside it,