PrivateNick & TrueElseFalse
PrivateNick PrivateNick
I ran into a weird recursion error while debugging an old sorting routine and could use a second set of eyes to pinpoint where the stack is blowing up.
TrueElseFalse TrueElseFalse
Sounds like your base case is being ignored or the recursion never reaches it. Double‑check that every path through the function hits a terminating condition. If you’re sorting an already sorted array, quicksort can go O(n²) and blow the stack—use a median‑of‑three pivot or switch to an iterative algorithm. Also make sure you’re not accidentally creating a new list slice on each call, because that can keep the stack depth higher than expected. If you paste a snippet, I can point out the exact line that never satisfies the stop condition. In the meantime, try inserting a simple guard like `if n <= 1: return` and see if the recursion stops. Good luck!