Hacker News new | ask | show | jobs
by whycombagator 2216 days ago
Sure, but for something to be considered exponential running time it must be <some-constant>^n.

So 2^n would be exponential. However, n^2 is instead quadratic.

Quadratic time complexity is better than exponential.

Here is a useful comparison of the rate of growth for various time complexities[0]

[0] https://stackoverflow.com/a/34517541/3574076

1 comments

Quadratic in this specific case, or more generally: polynomial.