3 ms·
For large enough trees it's probably more efficient to instead just switch from preorder to postorder traversal instead of changing the whole tree.
by Tainnor 4y 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.