63: Vertical order traversal of a binary tree

Given a binary tree, return vertical traversal

Note: If nodes are in the same row and column, the order should be from left ot right

 

Example 1

Input:        10    
             /  \
            2    3
           / \  / \
          4  7 5   1
            
            
Output: [[4], [2], [10, 7, 5], [3], [1]]

Example 2

Input:     1   
            \  
             3 

Output: [[1], [3]]
Difficulty:Medium
Topic:Tree
Problem #:63