This commit is contained in:
krahets
2023-08-19 19:21:30 +08:00
parent 5884de5246
commit c2642f951c
25 changed files with 163 additions and 110 deletions

View File

@@ -3543,6 +3543,8 @@ G & = \{ V, E \} \newline
<p>观察上图可发现,<strong>邻接表结构与哈希表中的「链地址法」非常相似,因此我们也可以采用类似方法来优化效率</strong>。例如,当链表较长时,可以将链表转化为 AVL 树或红黑树,从而将时间效率从 <span class="arithmatex">\(O(n)\)</span> 优化至 <span class="arithmatex">\(O(\log n)\)</span> ,还可以通过中序遍历获取有序序列;此外,还可以将链表转换为哈希表,将时间复杂度降低至 <span class="arithmatex">\(O(1)\)</span></p>
<h2 id="914">9.1.4. &nbsp; 图常见应用<a class="headerlink" href="#914" title="Permanent link">&para;</a></h2>
<p>实际应用中,许多系统都可以用图来建模,相应的待求解问题也可以约化为图计算问题。</p>
<p align="center"> 表:现实生活中常见的图 </p>
<div class="center-table">
<table>
<thead>