Hacker News new | past | comments | ask | show | jobs | submit login

From the page:

> One shall write a program that compresses string "AAABBAAC" to its compressed form "3A2B2A1C".

Interesting programming exercise. Although, the resulting string in the example is still the same length. The "algorithm" could be improved slightly by skipping the number for one-character substrings, e.g. "3A2B2AC"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: