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.
Done. Though I'm not sure if you can test for this actually. Like if you cube an even number, wouldn't you always get an even number, and vice versa?
This comment is hidden because it contains spoiler information about the solution
Hm, I might've misinterpreted the rules then, in which case - my bad. The only reason that was my assumption is that my solution didn't involve the cube part. But now that you point this out, it does seems a lot more plausible that that part of the rule just isn't covered in tests, and that I should've followed the instructions better :P
The description of this is incomprehensible, far more difficult than the challenge itself (not saying it's easy, just that the description is unreasonably hard). Like why is "chunk" used interchengably with "cube"? Especially since cube is an established mathematical term, which made this even more confusing. Very frustrating.
Here's my attempt of rewriting this:
The input is a
string
of integers and asize
integer. Split thestring
into substrings of the specifiedsize
, discarding the remaining characters fewer than thesize
.If the
size
is 0 or less, or is greater than the length of the string, return""
.Implement an algorithm transforming each substring as follows:
Combine the resulting substrings and return the result.
The goal is to basically implement the Brainfuck compiler. Took me a while to understand the problem myself, but I think understanding how the language itself works (rather than just the various commands it has) really helps, I found this video to be a good overview: https://www.youtube.com/watch?v=-3C200nCwpk