Recursion error in python


#1

I am using python and I have correctly figured out the solution. But the problem is there is recursion depth limit in python which is only around 1000. So my code is not working for inputs greater than 1000


#2

In Python there is limit of recursive calls. It can be set manually through cmd.
Check this out


#3

Yes, python has a recursive limit to guard against the stack overflow. For this question, got for iterative approach…