0

After drawing the recursion tree,the longest path can be found,which is $1\to 3n/4\to\cdots\to(3n/4)^k$. So the length is $\log_{4/3} n+1$. Thus $T(n)\le cn[1+25/28+...+(25/28)^{\log_{4/3} n+1}]$. That is $\frac{28cn}{3}[1-(25/28)^{\log_{4/3} n+1}]$. So $T(n)=O(n)$. Is this correct?

MickyZr
  • 19

0 Answers0