when the recursion starts and j value increases till 4 and at 4 it returns false as it goes out of the grid…then the false is returned to which part and after false is returned what is the next line that executes
Dry run for ratinmaze program
using 0 indexed
0,4
then false returns to previous point ie (0 , 3)
from 1,3 the fn call for ( i+1 , j ) is called ie ( 1, 3 ) then ( i, j+1 ) ->( 1, 4) then return false
returns back to 1, 3 ->then calls (i+1 , j ) 2 , 3
in short if the fn is
fn( i , j ) {
if( i == 4 || j == 4 )
return fasle;
fn( i , j+1)
fn( i+1 , j )
}
so then next call is called that comes in the code