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".
why did you use regxp to evaluate, simple > would be more elegant!
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.