Iterate over array and calculate largest subarray with all elements greater or equal to maxMean
ans = 0 ; NEW_LINE subarrayLength = 0 ; NEW_LINE for i in range ( n ) : NEW_LINE INDENT if ( arr [ i ] >= maxMean ) : NEW_LINE INDENT subarrayLength += 1 ; NEW_LINE ans = max ( ans , subarrayLength ) ; NEW_LINE DEDENT else : NEW_LINE INDENT subarrayLength = 0 ; NEW_LINE DEDENT DEDENT return ans ; NEW_LINE