Binary Tree Vertical Order Traversal (LC #314) is Meta's most frequently asked tree problem. Assign each node a column: root is , left child is column minus , right is plus . Use BFS to maintain top-to-bottom order within columns. Store nodes in a hash map keyed by column. Track min and max columns to iterate in order. This runs in time and space. The harder version (LC #987) requires sorting by row, then column, then value. Meta expects you to handle both.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/trees/binary-tree-vertical-order-traversal
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████████