Question DSA-STK-0079
HardA recursive function on a list of 100,000 elements hits RecursionError in Python. What is the most robust fix?
- A.
Raise the recursion limit to 10⁹
- B.
Rewrite it iteratively with an explicit stack
- C.
Sign up free to see the answer and a step-by-step explanation.