Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 603 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 603 Bytes

#Compressor code test

Just some code I wrote for a code test a while back.

##Instructions

  • Implement two methods to perform basic string compression/decompression
  • e.g. aaabbccc will compress to a3b2c3 and vice-versa.
  • You can assume the input is only letters.
  • If the compressed string did not become smaller then return the original string.
  • Provide some tests to cover these methods. Another example; a11b1 would become aaaaaaaaaaab.

##Notes

  • The code and the tests aren't even in separate files. Outrageous! Hey, it's a code test.

How to run

bundle exec rspec compressor.rb