HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by kristov | Hacker News Reader
Parent
Full thread
kristov
·
Is there a practical reason to do this in a real-world program?
View on HN
saagarjha
·
Sure, it’s the binary tree equivalent of reversing an array.
Tainnor
·
For large enough trees it's probably more efficient to instead just switch from preorder to postorder traversal instead of changing the whole tree.
Reply on news.ycombinator.com