Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thank you, and thank Codewars for letting you submit this. My browser was running too fast
Yeah I had fun on the first one :) Did something pretty similar to this in it for my string compression which is why i was reminded of it
The first one is definitely different. You can use any (de)compression algorithm for that; it's a different challenge. ( It's a fun one too, though with some frustrations over efficiency calculations. )
The second and third one are easier than this because they ruthlessly encode every group. ( Implementation of this one is not that hard, but conceptually, it's more complicated. )
I'd say it's novel enough.
( There might be a better match than either of those three though. )
Isn't this sort of a duplicate of kata like these?
https://www.codewars.com/kata/string-compression-challenge
https://www.codewars.com/kata/compress-slash-encode-a-message-with-rle-run-length-encoding
https://www.codewars.com/kata/basic-compression
I know it's not an exact match, but it's been done before.
The specification of how to handle compressing
"<numbers>"
in the input should be in the description, not have to be inferred from the first example test.It works, but it means the description is incomplete.
Or things like
compress('\\\\\\\\\\\\\\\\\\\\')
(10 escaped\
s)Tests do not contain cases like