Now check whether the array is sorted or not
for i in range ( 1 , n ) : NEW_LINE INDENT if ( A [ i ] <= A [ i - 1 ] or B [ i ] <= B [ i - 1 ] ) : NEW_LINE INDENT return False ; NEW_LINE DEDENT DEDENT return True ; NEW_LINE