LC: Binary Tree Vertical Order Traversal - spiralgo/algorithms GitHub Wiki

Binary Tree Vertical Order Traversal

The Essence:

Let there be some parent node at the column C. Then, its left child is at the column C-1 and its right child C+1. Each node value in the column must also be "row-sorted", i.e. from tree's root to the leaves. When the root is assumed as a pivot column, all the other nodes can be placed in relation to this.

Details:

There are 3 main methods of implementing this. The implementations and their explanations can be found here: https://github.com/spiralgo/algorithms/pull/314