199. Binary Tree Right Side View
Medium
Given the root
of 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.
Example 1:
Example 2:
Example 3:
Constraints:
The number of nodes in the tree is in the range
[0, 100]
.-100 <= Node.val <= 100
解法
Last updated