text: Driver code
code: let n = 3 ; let m = 3 ; let a = [ [ 2 , 3 , 7 ] , [ 5 , 4 , 2 ] , [ 3 , 7 , 11 ] ] ; let mappedMatrix = new Array ( MAX ) ; for ( let i = 0 ; i < MAX ; i ++ ) { mappedMatrix [ i ] = new Array ( MAX ) ; for ( let j = 0 ; j < MAX ; j ++ ) { mappedMatrix [ i ] [ j ] = 0 ; } } preprocessMatrix ( mappedMatrix , a , n , m ) ; countPrimePath ( mappedMatrix , n , m ) ; lexicographicalPath ( n , m , mappedMatrix ) ;