Walk this tree in reverse-level order: the bottom level first, then up, each level left to right.
A binary search tree with 7 nodes. Walking it in reverse-level order, which visits the bottom level first, then up, each level left to right.
20 is the leftmost node of the deepest level, the first popped off the stack.
Visiting 20, number 1 of 7. The order so far is 20.
40 pops off the stack next: levels come out bottom-up, each left to right.
Visiting 40, number 2 of 7. The order so far is 20, 40.
60 pops off the stack next: levels come out bottom-up, each left to right.
Visiting 60, number 3 of 7. The order so far is 20, 40, 60.
80 pops off the stack next: levels come out bottom-up, each left to right.
Visiting 80, number 4 of 7. The order so far is 20, 40, 60, 80.
30 pops off the stack next: levels come out bottom-up, each left to right.
Visiting 30, number 5 of 7. The order so far is 20, 40, 60, 80, 30.
70 pops off the stack next: levels come out bottom-up, each left to right.
Visiting 70, number 6 of 7. The order so far is 20, 40, 60, 80, 30, 70.
50 pops off the stack next: levels come out bottom-up, each left to right. That is the last one.
Visiting 50, number 7 of 7. The order so far is 20, 40, 60, 80, 30, 70, 50.
The reverse-level walk is 20, 40, 60, 80, 30, 70, 50.
The reverse-level traversal visited 20, 40, 60, 80, 30, 70, 50.