Https://ide.codingblocks.com/s/618685

please tell me the mistake

Hi Anmol,
image
ur code is missing this cin statement… if u read the ques carefully it is mentioned that first u take input the no of levels present in the binary tree then take input the nodes…
corrected code --> https://ide.codingblocks.com/s/618689
rest ur logic is fine… hope it clears all ur doubts…

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.