Traverse the array
for i in range ( 1 , N ) : NEW_LINE INDENT b = arr [ i - 1 ] [ 1 ] NEW_LINE d = arr [ i ] [ 1 ] NEW_LINE if ( b > d ) : NEW_LINE INDENT print ( " ( " , arr [ i - 1 ] [ 0 ] , b , " ) , ▁ ( " , arr [ i ] [ 0 ] , d , " ) " ) NEW_LINE return NEW_LINE DEDENT DEDENT