Find the maximum element from the next row that can be added to current row element
for ( int k = 0 ; k < m ; ++ k ) { if ( aux . get ( k ) [ 1 ] - j == 0 || Math . abs ( aux . get ( k ) [ 1 ] - j ) > 1 ) { V [ i ] [ j ] += aux . get ( k ) [ 0 ] ; break ; } } } }