mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 06:56:06 +00:00
deploy
This commit is contained in:
@@ -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 > 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>
|
||||
|
||||
Reference in New Issue
Block a user