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.
Simply try to run recrusive method million times and run also this method million times comparing execution times in milliseconds, then you will see the answer why not recruisive ;)
Description changed.
Fixed
not according to the Ruby style guide
IMO the right mindset is to solve problems as efficiently as possible. If the author wants to force us to use recursion, let them come up with a problem that absolutely requires recursion.
Also, as far as I know, JavaScript doesn't do tail-call optimization, so recursion can run into the recursion-depth limit fairly quickly. With that in mind, I'd solve most recursion problems using loops anyway.
why not? why must "recursive".
This way of solving the problem is brilliant in my opinion. A fact though is that the taks description said "recursive". So it's not a solution to this problem.
it doesn't specify in the description that empty list should return nils. User has to figure it out when trying to submit the solution
I think it's not described clearly or description is overcomplicated, especially with the negative parts, especially regarding that t's just in definition for odd number
why did you use regxp to evaluate, simple > would be more elegant!
tests were not very clearly defind. you have a function yet it's supposed to respond to the_function[element_num] which is an array behavior
The clojure tests shouldn't differ between the two datasctructures. I realise the difference, but this is a kata simply to illustrate the concept, rather than implement it in a type-safe, complete way.
There is no need whatsoever to use
*args
arguments. Your function will be passed an array, not an unpacked array. I suggest you read the specification again and try once more. This is a problem with your solution only, as far as it seems.Also, you posted an issue, but you don't actually tell me what your issue is. Because this is not explained, and I have given all the feedback that I can in this situation, I'm resolving the issue.
I don't think this Kata is correct as well. I used more different solution (with *args parameteres). Tested my solution in the console (ruby 2.0.0) and it works perfectly. When trying to submit, it throws strange errors.
please, correct the function name for the Ruby kata. It should be snake_cased ( like number_to_string) istead of CamelCased.
Loading more items...