Is there something like recursion limit in C/C++ as in Python (see this topic)?
Because I wrote a program and I got SIGSEGV even if I remove the array from the code (so that there is no array).
Here's the code:
link was here
You can look at the tests. In the first:
3
100000
200000
400000
I get SIGSEGV, while in the second:
4
100000
200000
300000
400000
I get AC.
So if I divide the number of "recursions" into few parts it doesn't return me SIGSEGV.
Am I thinking correctly?
If so, is there any way to increase this limit (as in Python)?
Edit: I mean, I know that I can write for example:
for(i=10000;i<=x;i+=10000)sub(i);
but I'm interested is any function (as in Python) which would do it for me.