Time complexity “polynomial in n”

1.1k Views Asked by At

When we say an algorithm performs in time complexity polynomial in $n$ where $n$ is a parameter of the algorithm do we mean literally $O(n)$ or $O(p(n))$ where $p$ is a polynomial?

1

There are 1 best solutions below

0
On

To say that the complexity is polynomial in $n$" means that there exists some polynomial $p$ such that the running time is $O(p(n))$.