Answer the question
In order to leave comments, you need to log in
How to calculate the sum of the series С[n]=1/(a+0)+1/(a+1)+1/(a+2)+...+1/(a+n) in O(1)?
It is necessary, in fact, to calculate the sum of the series С[n]=1/(a+0)+1/(a+1)+1/(a+2)+...+1/(a+n)
in O (1).
The question is related to this question: How can I replace the way to choose a random value with less memory consumption, or is there an alternative to random.choises()?
As an alternative, you can try to solve another, more useful problem:
In O(1) determine min(i) for which C[i] > X.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question