if current max is less than the right prefix min , we increase number of partitions .
if ( current_max <= right_min [ i + 1 ] ) : NEW_LINE INDENT partitions += 1 NEW_LINE DEDENT return partitions NEW_LINE