This commit is contained in:
krahets
2023-06-01 18:47:10 +08:00
parent 45f9dbbbf6
commit 5d3d1d12b9
79 changed files with 153 additions and 153 deletions

View File

@ -1993,7 +1993,7 @@
</ul>
<p>为了提高操作效率,<strong>可以将链表转换为「AVL 树」或「红黑树」</strong>,将查询操作的时间复杂度优化至 <span class="arithmatex">\(O(\log n)\)</span></p>
<h2 id="623">6.2.3. &nbsp; 开放寻址<a class="headerlink" href="#623" title="Permanent link">&para;</a></h2>
<p>「开放寻址」方法不引入额外的数据结构,而是通过“多次探测”来解决哈希冲突,<strong>探测方主要包括线性探测、平方探测、多次哈希</strong></p>
<p>「开放寻址」方法不引入额外的数据结构,而是通过“多次探测”来解决哈希冲突,<strong>探测方主要包括线性探测、平方探测、多次哈希</strong></p>
<h3 id="_1">线性探测<a class="headerlink" href="#_1" title="Permanent link">&para;</a></h3>
<p>「线性探测」采用固定步长的线性查找来解决哈希冲突。</p>
<p><strong>插入元素</strong>:若出现哈希冲突,则从冲突位置向后线性遍历(步长通常为 <span class="arithmatex">\(1\)</span> ),直至找到空位,将元素插入其中。</p>
@ -2042,7 +2042,7 @@
data-strict="1"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="zh-CN"
crossorigin="anonymous"