Returns maximum decimal value in binary matrix . Here p indicate power of 2
function MaximumDecimalValue ( mat , n ) { let dp = new Array ( n ) ; for ( let i = 0 ; i < n ; i ++ ) { dp [ i ] = new Array ( n ) ; for ( let j = 0 ; j < n ; j ++ ) { dp [ i ] [ j ] = 0 ; } } if ( mat [ 0 ] [ 0 ] == 1 ) {