How to solve EQAVG from LTIME75

Can someone please share their approach for the problem EQAVG ?

I am able to think of an O(N^2) solution. Can someone help me with the full solution?

2 Likes

Before solving it one should first make sure they understand the problem statement. Personally I don’t understand it. I believe it is ambiguous. There is no definition of what is meant by ‘arithmetic mean’.

I don’t think it’s ambiguous. arithmetic mean is the nomal average. You could have a look at the explanation of the sample case!

1 Like