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.
Very good, i didn't know the has_key method
It needs to be done manually, done.
solutions that do not pass the current tests - should be removed or marked as outdated. Maybe.
I know the test cases don't cover it, but what if at least one of them was 0? ;-)
Algun dia lo hare asi!
Click on Show Variations! There is multiline version.
This comment is hidden because it contains spoiler information about the solution
Yes. Read all the other comments.
The kata had a "bug" back then.
This would fail the current set of unit tests.
Because the kata was changed after this was made. See the comments below.
I failed this solution because of overflow!
That's really clever!
wait, I think I know. it's adding the numbers, then sorting them so 2 + 2 > 7 so false, etc. ?
Can someone explain what is going on? A little confused on this solution
It could work as long as you call it with exactly 3 parameters. The problem is when you call it with different number of parameters. In those case (a, b, c) version will raise an ArgumentError because the function requiers exactly 3 parameter. Your soultion will raise nil related errors if you call it less then 3 parameters, which is misleading, but it will NOT raise any error in the case of more then 3 parameters. And this latter means it may hide a coding error.
Loading more items...