dp [ i ] [ j ] : Check if { text [ 0 ] , . . text [ i ] } matches { pattern [ 0 ] , ... pattern [ j ] } or not
let dp = new Array ( N + 1 ) ; for ( let i = 0 ; i <= N ; i ++ ) { dp [ i ] = new Array ( M + 1 ) ; for ( let j = 0 ; j <= M ; j ++ ) { dp [ i ] [ j ] = false ; } }