Vertical order print BT

https://ide.codingblocks.com/s/49064
what is the error in the code.

I am able to solve this problem.but I am facing one new one.tree

for this tree
desired o/p:
1
10 9
8 6
3 7 13
14

but i am getting
1
10 9
8 6
7 3 13
14

here is the code

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