LeetCode. 314 Binary Tree Vertical Order Traversal

The basic idea to attach each node a col number. When goes to node->left. col -1, goes to right, col + 1. It will make things easier using a hashmap to store the nodes and correpsonding col number.


Code will be updated once I got the membership.

你可能感兴趣的:(LeetCode. 314 Binary Tree Vertical Order Traversal)