I am not getting how to build the tree using the given input.
Vertical Order Print Binary Tree search123
The Input is taken in Level order , just like you print tree in level order.
1 is the root node , then 2 and 3 are its children and the children of 2 i.e 4 and 5 and so on.
So the tree will be
1
2 3
4 5 6 7