Tree right view

i am getting how to take input in this case.plz help me

hello @Anushi_Agarwal
refer this code ->
image

approach is same as level order traversal.

ok i got it . Thankyou