Tree Bottom view

I am getting wrong answer in a test-Case of the question print Bottom view of tree and I am not able to figure it out why.

question link - https://hack.codingblocks.com/contests/c/202/954
code link - https://ide.codingblocks.com/s/42849

Hey Vinamra, check for this test case
input:
20 8 22 7 3 4 25 -1 -1 10 14 -1 -1 -1 -1 -1 -1 -1 -1
your code’s output :
0 10 4 14 25
correct output is :
7 10 4 14 25