Function to find the count of negative integers and check if zero exists in the array
def preProcess ( arr , n ) : NEW_LINE INDENT global cnt_neg NEW_LINE for i in range ( n ) : NEW_LINE INDENT if ( arr [ i ] < 0 ) : NEW_LINE INDENT cnt_neg += 1 ; NEW_LINE DEDENT if ( arr [ i ] == 0 ) : NEW_LINE INDENT exists_zero = True ; NEW_LINE DEDENT DEDENT DEDENT