Vertical Order Print Binary Tree search123

I am not getting how to build the tree using the given input.

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

https://ide.codingblocks.com/s/67580 MY code is giving a run-error in 1 test case. pls help on this

https://ide.codingblocks.com/s/67606 Even this solution is giving same error !
Help