Creating the Dp array
int [ , ] dp = new int [ m + 1 , n + 2 ] ; memset ( arr , 0 , sizeof ( arr ) ) ; for ( int i = 0 ; i <= m ; i ++ ) { for ( int j = 0 ; j <= n + 1 ; j ++ ) { dp [ i , j ] = 0 ; } }