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.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/190.
Please join the discussion to help us identify duplicate kata and retire them.
Fixed
This comment is hidden because it contains spoiler information about the solution
nope. But you're searching for the "big foot", with the kind of keywords. ;)
Since evaluation of a string may be done with recurcive parsing, I guess that's all you need to reach the recursion limit: 1001 numbers to pultiply means 1000
*
operators, which in turn may mean (depending on the implementation) 1000 recursive calls (or evnen worse...)Interesting.... so apparently eval is recursing somehow... do you happen to know of any online resources that might shine any more light on this? I searched on 'recursion errors without recursive functions' but didn't see anything about eval on SO.
thanks
no, if you get a reccursion limit error, it's triggered be a recursion. It's coming from the guts of the implementation of
eval
, that's all. So it's still triggered by your code, even if it's not it that is recursive.OK - so I guess I am learning something new here -
I thought 'maximum recursion depth' errors only occur as consequence of excessive recursive function calls per se.
Since my function does not call itself, there is no recursion - correct?
If so, then I should deduce that something else can trigger this error, such as a large number of non-recursing function calls?
Is this correct? If so, why is it not just giving a stack overflow error?
Thanks in advance
p.s. I have since solved it using a standard approach
read the message again, it tells explicitly that this error comes from that line of your code. So, guess what? surely it comes from the function you currently use in that line. ;)
btw: don't use that... ;)
Random tests throw false recursion depth errors.
My code has no recursion in it.
Thank you for your kidness!
It collides with the name of the function you're writing ;-)
This comment is hidden because it contains spoiler information about the solution
Approved - unfortuantely it's a duplicate ;-)
Not really an issue.
Description updated.
Loading more items...