Concept Flow - Vertical Order Traversal of Binary Tree
Start at root node
Assign horizontal distance = 0
Use queue for BFS traversal
Pop node from queue
Add node value to map at its horizontal distance
Add left child to queue with hd-1
Add right child to queue with hd+1
Repeat until queue empty
Sort map keys and output nodes in vertical order
Traverse the tree level by level, track horizontal distances, group nodes by these distances, then output groups from left to right.
