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.
It ought to be flexible enough with the latest edit.
I agree with this. If this hadn't been ranked at 7 kyu, I would have spent a long time working out how to optimally break chocolate in as few "operations" as possible. Clearly that turned out not to be necessary, but I shouldn't have to guess that based on the rating.
Sure, and sure, but it does fail.
It would be better to allow more solutions than it currently does, but what you suggest misses the point of the exercise. It's not to implement either case maximally efficiently, but to see the equivalence between 'non-recursive' and recursive versions of the same function.
So it's not really relevant which function needs to be fixed, as it involves the same principle. And then I prefer the simple way it's currently defined. I'll add the wikipedia link though.
Well it's a terrible implementation of reverse, but still technically valid. So really the test shouldn't fail.
This comment is hidden because it contains spoiler information about the solution
Add your approach here, but mark it as a spoiler.
It would be very helpful if the "Cheating" tests told me how I was cheating. I keep failing the second one but have no idea why since they aren't in the visible test code. (It does say "should use first argument", but I'm using all the arguments, so I must be misunderstanding the test.)