Right View Of A Binarytree
easy
1. Given a Binary Tree, print Right view of it. 2. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side.
Constraints
0 <= Number of Nodes <= 10^5 -1000 <= value of Node data <= 1000
Format
Input
Input is managed for you.
Output
Output is managed for you.
Example
Sample Input
15
1
1
-1
1
1
-1
1
-1
-1
1
-1
-1
1
-1
-1
Sample Output
1
1
1
1
1
Question Video