Pergunta de entrevista da empresa Wake’n’Code Technologies

write a code to do String compression and return the resulting string if its shorted than the original otherwise return the original