## Computer Science: An Overview: Global Edition (12th Edition)

No. As a general rule, the algorithm in $\Theta\left(n^{2}\right)$ will outperform the one in $\Theta\left(2^{n}\right)$ , but for small input values an exponential algorithm often outperforms a polynomial algorithm. In fact, it is true that exponential algorithms are sometimes preferred to polynomial ones when the application involves only small inputs.
No. As a general rule, the algorithm in $\Theta\left(n^{2}\right)$ will outperform the one in $\Theta\left(2^{n}\right)$ , but for small input values an exponential algorithm often outperforms a polynomial algorithm. In fact, it is true that exponential algorithms are sometimes preferred to polynomial ones when the application involves only small inputs.