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.
A node is visible from the right side if it is the rightmost node at its depth level.
1
/ \
2 3
\
5
Input: root = [1, 2, 3, null, 5] Output: [1, 3, 5] Explanation: From the right side you see 1 at level 0, 3 at level 1, and 5 at level 2 (it is the only node at that depth).
1
\
3
Input: root = [1, null, 3] Output: [1, 3] Explanation: The root and its right child are both directly visible from the right side.
[0, 100].-100 <= Node.val <= 100root = [1, 2, 3, null, 5]