Can anyone provide the code how can i input level order forr a binary tree?

As without I am unable to solve bottom view and questions of this type

@indrajeetbhattacharya5

For input 1 2 3 4 5 6 -1 -1 -1 -1 -1 -1 -1 , the tree is going to look like this.

As you can see, the input is taken for each successive level and first for left child, then for right child.
In case of no child, the input is -1.

I will try it using following hint and will get back to you if any error occurs.