To store the count of elements from the array which are less than mid and the elements which are equal to mid
countless = 0 ; countequal = 0 ; NEW_LINE for i in range ( n ) : NEW_LINE INDENT if ( arr [ i ] < mid ) : NEW_LINE INDENT countless += 1 ; NEW_LINE DEDENT elif ( arr [ i ] == mid ) : NEW_LINE INDENT countequal += 1 ; NEW_LINE DEDENT DEDENT