The view from the right
transcript
Look at a tree from its right edge. On each level, you see one node. A quick idea: follow right children. It misses a node. Which one?
The top is eight. Go right to ten, and right to fourteen. Fourteen has no right child. The idea stops. But thirteen is the left child of fourteen. On its level, nothing is to its right. You see it. The answer has four nodes, not three.
Round one holds eight. It is the last. Round two holds three and ten. The last is ten. Round three holds six and fourteen. The last is fourteen. Round four holds thirteen alone. It is the last.
Run a level order walk with a queue. In each round, keep the last node taken. It may be a left or a right child.
The view is the last node of each level. It is not always a right child. Position size minus one. Full breakdown in the lecture.