Tree Bottom vew i tried this problem on code blocks and for some reason its showing error could you pls help me out

here is the code:

Shivam, in the question, it is mentioned that the input is in level order format, so you need to build tree as per that only, if you will follow different approach, It will show you wrong ans only.