Reverse Level Order
Level order pushed onto a stack, right child first, then popped: bottom level first, left to right.
Tree Traversals: Reverse level order
20 is the leftmost node of the deepest level, the first popped off the stack.
Cost
- Best
- O(n)
- Average
- O(n)
- Worst
- O(n)
- Space
- O(n)
Before this
A variant of
Taught by the same lesson
Tree Traversals covers these too, in the same run.