Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
kristov
3y ago
0 comments
Save
Share
Is there a practical reason to do this in a real-world program?
0 comments
2 comments · 1 top-level
top
newest
oldest
saagarjha
3y ago
· 1 in thread
Sure, it’s the binary tree equivalent of reversing an array.
Tainnor
3y ago
For large enough trees it's probably more efficient to instead just switch from preorder to postorder traversal instead of changing the whole tree.
j
/
k
navigate · click thread line to collapse