Hacker News new | ask | show | jobs
by saagarjha 1296 days ago
Sure, it’s the binary tree equivalent of reversing an array.
1 comments

For large enough trees it's probably more efficient to instead just switch from preorder to postorder traversal instead of changing the whole tree.