Class Solution
java.lang.Object
g0101_0200.s0199_binary_tree_right_side_view.Solution
199 - Binary Tree Right Side View.<p>Medium</p>
<p>Given the <code>root</code> of a binary tree, imagine yourself standing on the <strong>right side</strong> of it, return <em>the values of the nodes you can see ordered from top to bottom</em>.</p>
<p><strong>Example 1:</strong></p>
<p><img src="https://assets.leetcode.com/uploads/2021/02/14/tree.jpg" alt="" /></p>
<p><strong>Input:</strong> root = [1,2,3,null,5,null,4]</p>
<p><strong>Output:</strong> [1,3,4]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> root = [1,null,3]</p>
<p><strong>Output:</strong> [1,3]</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> root = []</p>
<p><strong>Output:</strong> []</p>
<p><strong>Constraints:</strong></p>
<ul>
<li>The number of nodes in the tree is in the range <code>[0, 100]</code>.</li>
<li><code>-100 <= Node.val <= 100</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
rightSideView
-