Input related problem

when to stop taking inputs or how to take input in this problem?

hello @pradhumangupta99

Level order input is taken and tree is build by using the queue, in which firstly u will take a queue of nodes, and then it will have a data which will represent a root node, and then u will accept the left and right child of root node, -1 value means that the node does not have any child.

why is the output of sample case 4 2 6 3? it should be 4 5 6 3

ur input is incomplete.

refer this here they have clearly mentioned the structure of the tree.
image

@pradhumangupta99 You reopened the doubt.
Is your doubt resolved?

no didnt understood the input still why is their 2 spaces b/w 6 & -1 and what is the meaning of the NOTE?

what is the meaning of bottom view of a tree ?

Refer this Tree Bottom View if you can’t visualize.
You can also refer this article https://www.geeksforgeeks.org/bottom-view-binary-tree/

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.