Concept Flow - Vertical Order Traversal of Binary Tree
Start at root node
Assign horizontal distance = 0
Traverse left child: hd = hd - 1
Traverse right child: hd = hd + 1
Store nodes in map by hd
Sort map keys from min to max hd
Output nodes grouped by hd in order
Start from root with horizontal distance 0, traverse left and right children adjusting horizontal distance, store nodes by distance, then output nodes grouped by these distances from left to right.