What is this expression in big O notation?

48 Views Asked by At

$$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)}$

1

There are 1 best solutions below

0
On BEST ANSWER

there is an exponential run time, therefore it is the first one.

This is another place to look if you are confused:

http://en.wikipedia.org/wiki/Big_O_notation