Given matrix mat [ ] [ ]
let mat = [ [ 1 , 2 , 3 , 1 ] , [ 3 , 1 , 2 , 4 ] , [ 2 , 3 , 1 , 1 ] ] ; for ( let i = 0 ; i < 105 ; i ++ ) { dp . push ( [ ] ) ; for ( let j = 0 ; j < 105 ; j ++ ) dp [ i ] . push ( [ ] ) ; }