$$2^{n-1} + 2^{n-1} + \ldots + 2$$
pretty basic question, but I'm afraid I don't know if it's $O(2^n)$ or $2^{O(n)}$
$$2^{n-1} + 2^{n-1} + \ldots + 2$$
pretty basic question, but I'm afraid I don't know if it's $O(2^n)$ or $2^{O(n)}$
there is an exponential run time, therefore it is the first one.
This is another place to look if you are confused: