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.
You need some training in kata authoring. There are still no random tests.
Thank you for your question. In general, I can say that when I was makin this kata, I meant the variant with "aaaabbbb2" , but when implementing the algorithm, I did this variant "a4b4a4b4". So I think that the more correct answer would be the second one. But for first question answers are "abab" and "ab2"
P.S. For the string "abab" answer is "abab" because there arent any consecutive identical symbols.
What is expected result for input
"aaaabbbbaaaabbbb"
? Is it"aaaabbbb2"
(longest substring), or"a4b4a4b4"
(shorter compressed result)?In general, the "compression" scheme has to be described and specified. Examples are not enough, you have to describe how the "compression" works.
This "compression" scheme seems to be ambiguous. What is expected compressed result for
"abab"
and for"abb"
?Thanks for report!
Thanks for report!
The function name in the initial solution:
compress_strings
doesn't match the function imported by the tests:compress_string
:^^
ok, done.
Much better, now perhaps it would be much clearer if users know that
Input1, Input2, Input3
correspond tos, w, h
got retired
Ok, I see. Is it better now?
No need...
Just -->
Write a function that ...
As for examples -> You can use something like
s = ..., w = ..., h = ...
or in the form of Input1, Input2, Input3 --> OutputWhat do you suggest?
make_matrix
?Could you also remove
make_grid
and use something more generalized, to be compatible with other languages ?Loading more items...