Tree traversals
easyThe three depth-first orders run the same two recursive calls; all that changes is where `visit` sits. Swap the stack for a queue and depth-first becomes breadth-first.
Worst
O(n)Space O(h) for the stackLoading the tree traversals engine…