Generate an array consisting of elements of the current column
int temp [ N ] ; for ( int j = 0 ; j < N ; j ++ ) { temp [ j ] = arr [ j ] [ i ] ; } if ( ! checkBitonic ( temp , N ) ) { cout << " NO " << endl ; return ; } } cout << " YES " ; }