the output is absolutely correct still one test case is fail pls tell and make suitable changes
PLs resolve as soon as possible
the answer is wrong for the following test case
4 5 -1 6 7 -1 -1 8 -1 -1
the answer should be 4 5 6 8
ur answer 4 5
Pls tell the correction to be done
acc to me ur tree is not getting built correctly
the inorder traversal comes out wrong
probably ur rightView function is correct.
but u can check out my code
its all correct answers