3 ms·
Iterating over tree structures is a pain without recursion, but that's the only situation where I feel I need recursion.
by timw4mail 3y ago
Iterating over tree structures is a pain without recursion, but that's the only situation where I feel I need recursion.
- ivancho 3y agoI don't think you can use tail call recursion for tree walking unless you also manually maintain another stack. And at that point iterative code looks just as readable