Input Incorrect

I think input format given in this question is wrong. -1 are not properly placed.

NO input is correct
it is level order input
first level contains 1 which is root
then on its left 2 and right 3
now below 2 we have 4 and 5 as left and right child of 2 resp.
and for 3 left child is null as -1 is given, right child is 6
now in 4th level we have -1 -1 3 times each for 4,5,and 6 of level 3

i hope you understand input now

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved

1 Like

Thank you for the response. :heart: