Binary Tree Right Side View

Title: Binary Tree Right Side View Source: leetcode.com

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:
Given the following binary tree,

You should return [1, 3, 4].

Python solution

Rate this post

Leave a Reply