Binary Tree Right Side View
Tree BFS
Problem
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Thought Process
The only additional thing we will be do is to append the last node of each level to the result array.
Solution
Last updated
Was this helpful?