This follows easily from a simple fact in Calculus:
and we have the following inequality:
Here we can conclude that S = 1 + 1/2 + ... + 1/n is both Ω(log(n)) and O(log(n)), thus it is ?(log(n)), the bound is actually tight.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…