Vertical order print

please help me to find the mistake in the code

hello @krikhi
your logic for printing vertical order is correct.
pls tell me what issue u are facing

I am facing run error

please help me to find the mistake

see ur algorithm for pinting vertical order is correct.
u r getting run error because of ur build tree function.

check this code for building tree level wise->
image

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.