1
0
mirror of https://github.com/bregman-arie/devops-exercises.git synced 2024-11-24 08:22:12 +02:00
devops-exercises/topics/python/compress_string.md
abregman 99c4e02ecf Rename exercises dir
Name it instead "topics" so it won't be
strange if some topics included "exercises" directory.
2022-08-02 01:53:56 +03:00

234 B

Compress String

  1. Write a function that gets a string and compresses it
  • 'aaaabbccc' -> 'a4b2c3'
  • 'abbbc' -> 'a1b3c1'
  1. Write a function that decompresses a given string
  • 'a4b2c3' -> 'aaaabbccc'
  • 'a1b3c1' -> 'abbbc'