Tree right view

I’m not getting correct output but looks like the logic is correct.

hello @div_yanshu07 i have seen your code and you are not taking the output in the correct manner .
you have to take input with the help of queue .