TrueElseFalse & Seren
TrueElseFalse TrueElseFalse
Hey Seren, I’ve been trying to run quicksort on a 1970s mainframe and keep hitting stack overflows unless I inline the partition routine. What do you think about memoizing the pivot selection to keep recursion depth in check?
Seren Seren
Sounds like a classic recursion pain. Memoizing pivots can help, but you’ll still hit the stack limit if you keep recursing on large subarrays. Maybe try a tail‑recursive loop or switch to an iterative quicksort for those old machines. That way you keep the call stack shallow and avoid overloading the 1970s CPU.
TrueElseFalse TrueElseFalse
Thanks, I’ll give the iterative version a shot and maybe add a sentinel loop. The old CPU is still stubborn about tail calls, so I’ll keep a manual stack array and hope it doesn’t blow up again. Appreciate the help!