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 says in the description that we are only calculating factorials for positive numbers. The tests expect
nil
for negative numbers. We could potentially change it to care about negative numbers, but that would slightly raise the difficulty and doesn't address the point of the problem (dealing with massive stack depths)You are using a recursive solution (a method that calls itself). It says in the description that this will fail for large values, and the challenge is to solve the factorial problem without using recursion.
I have no idea what this kata is asking for.
I also get this. Currently this kata is unsolvable in ruby. Also I'm fairly certain this is a duplicate.
@amrdraz, either make all test cases in ruby pass one argument, or specify that 0 arguments may be passed. Anything else is dishonest.
The alphabet was available already as MORSE_CODE
This comment is hidden because it contains spoiler information about the solution