/compression-puzzle

Attempts to crack the "compression puzzle".

Primary LanguagePython

The Compression Puzzle

GitHub Actions Status

One lovely Friday we were faced with this nice yet intriguing programming puzzle.

One shall write a program that compresses string "AAABBAAC" to its compressed form "3A2B2A1C".

These attempts were made,...

Basic rules

  1. No external libraries or tools shall be used. Only standard, bundled libraries apply.
  2. "Assert" inside your solution if the function does what it is suppose to do.
  3. You can apply as many solutions as you want to any language you want.

Additional Q/A

  • What if my language is not yet supported? No problem. Just pretend that it does and provide some instructions on how can it be ran in the PR. We'll try to use the wizzardy of Nix and/or Docker to compile and run it along with others.
  • Can I submit multiple solutions? Yes; please do.
  • Should we benchmark the solutions agains each other? Possibly.
  • Why are you doing this? Because its fun!
  • Will there be any recap/summary/article written? Hopefully, yes.
  • How can I contact you? Try @otobrglez on Twitter or via GitHub issues or something.

Development

# Via Nix Shell
$ nix-shell shell.nix --run "make run"
# if you preffer to roll your own local brew
$ make

To run individual languages use:

make bash
make clojure
make fs
make go
make javascript
make python
make ruby
make rye
make scala

Authors