devops-exercises/topics/python/compress_string.md

9 lines
234 B
Markdown
Raw Normal View History

2021-08-13 08:23:50 +02:00
## Compress String
1. Write a function that gets a string and compresses it
- 'aaaabbccc' -> 'a4b2c3'
- 'abbbc' -> 'a1b3c1'
2. Write a function that decompresses a given string
- 'a4b2c3' -> 'aaaabbccc'
- 'a1b3c1' -> 'abbbc'