This commit is contained in:
krahets
2024-04-28 22:36:06 +08:00
parent 7803a73a99
commit b1bd0c8f8d
43 changed files with 990 additions and 430 deletions
@@ -2960,7 +2960,7 @@ T(n) = 3 + 2n
\]</div>
<p>Since <span class="arithmatex">\(T(n)\)</span> is a linear function, its growth trend is linear, and therefore, its time complexity is of linear order, denoted as <span class="arithmatex">\(O(n)\)</span>. This mathematical notation, known as "big-O notation," represents the "asymptotic upper bound" of the function <span class="arithmatex">\(T(n)\)</span>.</p>
<p>In essence, time complexity analysis is about finding the asymptotic upper bound of the "number of operations <span class="arithmatex">\(T(n)\)</span>". It has a precise mathematical definition.</p>
<div class="admonition abstract">
<div class="admonition note">
<p class="admonition-title">Asymptotic Upper Bound</p>
<p>If there exist positive real numbers <span class="arithmatex">\(c\)</span> and <span class="arithmatex">\(n_0\)</span> such that for all <span class="arithmatex">\(n &gt; n_0\)</span>, <span class="arithmatex">\(T(n) \leq c \cdot f(n)\)</span>, then <span class="arithmatex">\(f(n)\)</span> is considered an asymptotic upper bound of <span class="arithmatex">\(T(n)\)</span>, denoted as <span class="arithmatex">\(T(n) = O(f(n))\)</span>.</p>
</div>