Standard Bar Binary Trees · Medium Problems O(n) · O(n)
A plant inspector maps a tree-shaped sprinkler network from beneath the floor: each junction's sub-pipes fan one column left and one column right, and the lowest pipe in a column covers everything above it. The report lists one junction per column, left to right — and when two junctions occupy the same column at equal depth, the one reached later in a level sweep takes the ledger slot.
Input: The root of a binary tree given as a level-order array where null marks a missing child. The root sits at column 0.
Output: Return an array of bottom-view values, one per column, ordered left to right.
1 <= number of nodes <= 10^5-100 <= node value <= 100Input: {"tree":[1,2,3,4,5,6,7]}
Output: [4,2,6,3,7]
Column 0's deepest pair are 5 and 6; the later-swept 6 holds the slot.
Input: {"tree":[1,2,3,null,4,null,5]}
Output: [2,4,3,5]
Deeper nodes 4 and 5 cover the root's column and column 2 respectively.