Given the root of a binary tree, imagine standing on the right side of it. Return the values of the nodes you can see, ordered from top to bottom — that is, the last (rightmost) node visited at each level.
Input / output
root: TreeNode (JSON test fixture is a LeetCode-style level-order array, e.g. [1,2,3,null,5,null,4], with null for a missing child)int[]Can you solve it with a single recursive DFS pass (visiting right children before left, recording the first node seen at each depth) instead of a level-by-level BFS?