Tree Bottom view i am facing problem in input i think i am taking level order input but its showing something else kindly help

here is the code of the following

@sonishivam417
You have taken a preorder input instead of level order input.
Refer to this code for level order input function - https://ide.codingblocks.com/s/108450
Use this in your code and make the according changes.