mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-16 06:18:02 +00:00
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:
@@ -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')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user