Binary Tree Right Side View

Prerequisite: BFS on Tree

Given a binary tree, return the rightmost node of each level.

It should be noted that at each level there can only be at most one rightmost node.

Try it yourself

โ†
โ†‘TA ๐Ÿ‘จโ€๐Ÿซ