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

Invest in Yourself
Your new job is waiting. 83% of people that complete the program get a job offer. Unlock unlimited access to all content and features.
Go Pro