Of course that depends on the number of "special operations" you need to perform. Since it's fine for the current test cases, why bother with writing it out as a while loop?
If there would be a test case which does give this problem, rewriting it to a non-recursive form is the first thing one would do...
Ruby fixed.
Not a legitimate solution but may expose the message error in Ruby:
Not sure how to reproduce this. Please provide some example code.
Of course that depends on the number of "special operations" you need to perform. Since it's fine for the current test cases, why bother with writing it out as a while loop?
If there would be a test case which does give this problem, rewriting it to a non-recursive form is the first thing one would do...
agreed, still failing w/ test error
This is still a problem.
same here
Same here. I'm hoping this is a test error.
Same here.
How much memory does one call of this use?
yes, same here. Please fix this.