Right view of tree

sir ,why do you pass maximum index as reference here in function arguments??
void print_right_view(node *root, int level, int &max_level)
{

}

Hey @mzk1994
Do a dry run on some unbalance tree and u will understand

Let me know if u need help

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.