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.
Click on Show Variations! There is multiline version.
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.
I think accessing value in hash is O(log(n)) so the entire function is O(n * log(n)). Anyway, thanks & you're welcome.
It seems the test6..8 are missing from the C# version. I've got tis result when submitting a solution with simply converting the params to Int32:
I guess those missing cases are for the big integers. So without them this kata is far from 4 kyu rather 7 or 8.