Function to find the prefix sum of the matrix from i and j
function subMatrixSum ( i , j , len ) { return prefix_2D [ i ] [ j ] - prefix_2D [ i ] [ j - len ] - prefix_2D [ i - len ] [ j ] + prefix_2D [ i - len ] [ j - len ] ; }