How H OR V is added to form string in smaller problem in recursion

How does the program knows that it to add H and V to form a path.In final result we are adding H but before that in smaller problem "how the progarm knows that when we go HORIZONTAL an alphabet “H” has to be added in string

@Par1hsharma


As you can see here when we are moving horizontally in getMazePath(cr,cc+1,er,ec);
we add +1 to the cc which is column.
and when we move vertically in getMazrPath(cr+1,cc,er,ec);
we add +1 to the cr which is row.

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.