Given the root of a binary tree, return its bottom view — the nodes visible when viewed from directly below, ordered left to right by horizontal distance. The root has horizontal distance 0; a left child is one less, a right child one more. For each horizontal distance the bottommost node (last reached in level order) is visible. The tree is given as a level-order array.
Input: A level-order array of the tree.
Output: Array — bottom-view node values, left to right.
Input: [1,2,3,4,5,6,7]
Output: [4,2,6,3,7]
Explanation: The lowest node per horizontal distance.Input: [1]
Output: [1]
Explanation: Single node.Input: []
Output: []
Explanation: Empty tree.0<=nodes<=10^4-1000<=value<=1000