How can I prove this complexity?
$$\sum_{k=1}^n \sqrt{k}=\Theta(n\sqrt{n})$$
The theta notation means a quantity bounded in the limit both above and below by constant multiples of the given expression.
How can I prove this complexity?
$$\sum_{k=1}^n \sqrt{k}=\Theta(n\sqrt{n})$$
The theta notation means a quantity bounded in the limit both above and below by constant multiples of the given expression.
$$\sum_{i=1}^n \sqrt{i} \leq \sum_{i=1}^n \sqrt{n}=n \sqrt{n}$$ and $$\sum_{i=1}^n \sqrt{i} \geq \sum_{i=\lfloor \frac{n+1}{2} \rfloor}^n \sqrt{i} \geq \sum_{i=\lfloor \frac{n+1}{2} \rfloor}^n \sqrt{\frac{n}{2}} \geq \frac{n-1}{2} \sqrt{\frac{n}{2}}= \frac{n\sqrt{n}}{2 \sqrt{2}}-\sqrt{\frac{n}{8}}$$