I created two codes one for level order concept for printing the right view of the binary tree and another one for preorder traversal for printing the right view. They are giving me the right outputs and completely different from the codes generated in the above video lecture. So, I want to know whether my approach is correct or not. Code for Level Order Right View:- https://ide.codingblocks.com/s/243148
Code for Pre Order Right View:- https://ide.codingblocks.com/s/243151
Please do check my codes & remark whether they are correct or not!
@subham221 yes both the codes are absolutely correct(also passes the test cases on submission) !!
If you don’t have anymore queries , just mark the doubt resolved