mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-17 14:10:57 +00:00
deploy
This commit is contained in:
@@ -1942,7 +1942,7 @@ T(h) & = 2 \frac{1 - 2^h}{1 - 2} - h \newline
|
||||
& = O(2^h)
|
||||
\end{aligned}
|
||||
\]</div>
|
||||
<p>进一步地,高度为 <span class="arithmatex">\(h\)</span> 的完美二叉树的结点数量为 <span class="arithmatex">\(n = 2^{h+1} - 1\)</span> ,易得复杂度为 <span class="arithmatex">\(O(2^h) = O(n)\)</span>。以上推算表明,<strong>输入列表并建堆的时间复杂度为 <span class="arithmatex">\(O(n)\)</span> ,非常高效</strong>。</p>
|
||||
<p>进一步地,高度为 <span class="arithmatex">\(h\)</span> 的完美二叉树的结点数量为 <span class="arithmatex">\(n = 2^{h+1} - 1\)</span> ,易得复杂度为 <span class="arithmatex">\(O(2^h) = O(n)\)</span> 。以上推算表明,<strong>输入列表并建堆的时间复杂度为 <span class="arithmatex">\(O(n)\)</span> ,非常高效</strong>。</p>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user