Problem 199 · Medium

Binary Tree Right Side View

BFS level-order; record the last node of each level as the right-side view.

Open the interactive visualisation