f(n) = Theta(log^2 n)
