algorithmica-org/algorithmica

Recursion vs. work list

dabrahams opened this issue · 1 comments

Recursive algorithms that can't tail-call optimized can still be implemented without recursion by using an auxiliary work list (essentially replacing the call stack with a dynamically allocated array). It would be useful to see some discussion of the tradeoffs inherent in that approach.

agreed. I do this all the time, it's super effective.