Concept Flow - Vertical Order Traversal of Binary Tree
Start at root node
Assign horizontal distance = 0
Traverse left subtree
Decrease horizontal distance by 1
Traverse right subtree
Increase horizontal distance by 1
Collect nodes by horizontal distance
Sort nodes by horizontal distance
Output nodes in vertical order
Start from the root with horizontal distance 0, traverse left decreasing distance, right increasing distance, collect nodes by distance, then output sorted vertical lines.
