
Binary Tree Right Side View
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.
(二叉树的右视图)
Example:

1. BFS按层遍历
1 |
|

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.
(二叉树的右视图)
Example:

1 |
|
近期评论