No output in Right Side View

I am not getting any output of the following code for the Question — Right Side View of Binary Tree
The link of my code :

Someone plz reply…

hello @sanjit_15
image

u r not storing the updated root value , after calling build tree function.

it should be
root=buildtree();

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.