Tree bottom view


one testcase failed.

20 8 22 5 3 4 25 -1 -1 10 14 -1 -1 -1 -1 -1 -1 -1 -1
o/p generated by ur code is: 5 10 4 22 25

expected o/p: 5 10 4 14 25
pls try to find the error by yourself first
and if u face any prblm dont hesitate to ask the doubts

the way i am constructing the tree is fine or not?
I got that i have to make bottomView function again

Thanks a lot for the way you pointed my mistake. Solved the problem and solved topView also with help of this.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.