Getting Run Error for this Problem

This is the code that I have written - https://ide.codingblocks.com/s/641445. It got accepted successfully on leetcode but failed here. Please help.

hi @LPLC0111
there is no code saved at the link. pls resend it…

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.

https://ide.codingblocks.com/s/641888. this is the code. Please check

hi @LPLC0111
i don’t understand what u are trying to do after building the tree… all u need to do is after tree is build do a level order traversal and count nodes…
corrected code --> https://ide.codingblocks.com/s/641909

hi @LPLC0111
i hope its clear now as it was a very basic question…

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.