Tree Bottom view Input format

Please explain how are we supposed to build the tree using the input format provided in ques?

@samriddhi.srivastava2017 hey Samriddhi in this question the tree build level wise. you can refer this line of code to understand how to build level order tree structure.build level order code snippet.

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.

What is meant by bottom view? why is 5 not included in the bottom view of the tree?

@samriddhi.srivastava2017 hey samriddhi
______ 1
____2 _______3
_4 ____5 ___
______ 6 _______
as you can see 1 5 6 are in the same line if you see columns wise if you see 6 from bottom you can’t see 1 and 5 because 6 hides the both so that why 5 is not included.

How can 6 enter the next line?

Won’t it be in the same level as 4 and 5?

@samriddhi.srivastava2017 hey samriddhi this tree is right I will suggest you to dry run the code snippet with inputs you will get to know.

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.