Whats the error
hello @adarshsingh2k
ur logic for printing right view is correct.
the issue is with taking input.
u havent writtent any code for reading tree thats why it is giving error.
so write code for taking tree as input (level order) and then it will work fine
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.