It will store the minimum product till a given cell ( for - ve elements )
int [ , ] minPath = new int [ N , M ] ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < M ; j ++ ) { int minVal = int . MaxValue ; int maxVal = int . MinValue ;