3 ms·
Tbf most code doesn't encounter trees deep enough to generate a stack overflow. It's more of a concern with things like mutual recursion (multiplying your fram
by setr 7y ago
Tbf most code doesn't encounter trees deep enough to generate a stack overflow.
It's more of a concern with things like mutual recursion (multiplying your frame depth at each step, instead of just +1) or if your recursion depth is based on unbounded user input (eg iterating over an AST, or this code snippet)