Concept Flow - Bottom View of Binary Tree
Start at root node
Assign horizontal distance = 0
Use queue for level order traversal
For each node dequeued:
Record node at horizontal distance
Overwrite previous node at hd
After traversal, extract nodes from min to max hd
Print bottom view nodes in order
Traverse the tree level by level, track horizontal distances, overwrite nodes at each horizontal distance to get the bottom view.