Cannot debug according to testcases


I think error is in my level order tree formation but i cannot figure out how.

@Ayush-Kokande-2816457821730452
yes the mistakes are in your buildtree function.
while pushing the left and right, you just pushed root->left and right in the queue instead of temp->left and right.

i have also corrected your code, https://ide.codingblocks.com/s/244959
please mark the doubt as resolved if your doubt is clear now.

silly mistake. thanks