MazePath Recursion

Mam,In this lecture you had made two different array List for calling recursion in horizontal case then vertical case but same can be achieved by using single list first for horizontal then for vertical. Is there any drawback in using same array list in place of two?

hi @mr.excalibur22
we need two arraylist as horizontal arraylist will contain all the result when we move horizontal.
and the vertical arraylist will contain all the results when we vertical.As we have to two option either to move horizontal or to move vertical so we need two arraylist.

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.