Declaring and initializing CRF ( can reach from ) matrix
var CRF = Array . from ( Array ( N ) , ( ) => Array ( N ) ) ; ; for ( var i = 0 ; i < N ; i ++ ) for ( var j = 0 ; j < N ; j ++ ) CRF [ i ] [ j ] = false ; CRF [ N - 1 ] [ N - 1 ] = true ;