5 ms·
I 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 r
by ivancho 3y ago
I 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