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.
This comment is hidden because it contains spoiler information about the solution
Fixed for any language :)
This comment is hidden because it contains spoiler information about the solution
My pleasure :)
Good job!
JS and Ruby translation kumited :)
@AlexIsHappy: Don't use headings to create bold text. Instead, create a short heading (e.g.
# Task
) and add the text after the heading.Something else I just thought about. The metaphor for splitting a watermelon is probably not the best fit because in real life, a watermelons weight would certainly be a float and not an int. Also, there's no real reason why anybody would need each half to be of an even weight, other than to fit the story.
Perhaps a better metaphor would make the problem easier to understand. For example, if the boys have a box of earplugs and want to make sure that they have the right number so that both boys can have earplugs for the future. In this scenario, the number of earplugs makes sense as an int instead of a float and there is a reasonable reason why each boy would need an even number since (most) people need 2 earplugs in order to function properly.
Just my thoughts.
I love an added story behind a problem, but this story was a bit verbose and obfuscates a fairly straight-forward task. It could easily be rewritten more concisely while maintaining the casual tone of the kata.
I can't even see anybody within my own clan. This is basically a must-have.
One of my issues with katas is that there's no context, so we have no idea what metric is more important for any given kata, so it's impossible to make the performance vs code size vs readability judgement call.
I chose code size, but I'm aware that comes with performance problems shrug you gotta choose something ;)
This comment is hidden because it contains spoiler information about the solution