See an example first: input size $=n$. Two algorithms Algo 1 and Algo 2 for the same problem.
<aside>
🔹 Informal definition: $f(n)\in\Theta(n)$ if $f(n)$ is linear in $n$.
$f(n)\in\Theta(n^2)$ if $f(n)$ is quadratic in $n$.
</aside>
$T_1(n)\in \Theta(n)$ and $T_2(n)\in \Theta(n^2)$. Algo 1 is more efficient than Algo 2 when $n$ is sufficiently large.
注意:文獻上通常用 “=”, 例如:$100n=\Theta(n)$ and $5n^2+100n+20=\Theta(n^2)$.
🔹 Some of the most common complexity categories: constant $k\in \mathbb{N}$. $\Theta(\lg n)$ logarithmic time, $\Theta(\log^k n)$ polylogarithmic time, $\Theta(n^{1/2})$ sub-linear time, $\Theta(n)$ linear time, $\Theta(n^k)$ polynomial time, $\Theta(n^2)$ quadratic time.

https://www.backendmesh.com/time-complexity-a-key-to-efficient-algorithms/
(課堂上提供)