TreesExplained
Boundary Traversal
Left edge, then leaves, then right edge going up.
Time
O(n)
Extra space
O(h)
Use it for
Printing the outline of a tree.
Left edge, then leaves, then right edge going up.
Time
O(n)
Extra space
O(h)
Use it for
Printing the outline of a tree.