A console application that compresses an alphabetical string by collapsing consecutive characters. The rules of the compression algorithm are defined by the test cases below.
-
Input: aaabccccdd Output : a3bc4d2
-
Input: yyyyyzzzzzzzzzz Output: y5z10
-
Input: abcd Output: abcd (note: not a1b1c1d1)