Update compress solution so AAAAB becomes A4B.

Previously the solution would yield A4B1, which doesn't have as much compression.
This commit is contained in:
Donne Martin
2016-02-09 06:52:32 -05:00
parent 9bf96eabaa
commit 4953e6c114
2 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ class TestCompress(object):
assert_equal(func(None), None)
assert_equal(func(''), '')
assert_equal(func('AABBCC'), 'AABBCC')
assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')
assert_equal(func('AAABCCDDDD'), 'A3BC2D4')
print('Success: test_compress')