This commit is contained in:
krahets 2023-02-26 20:16:38 +08:00
parent 7cc1de8bff
commit c20bdb15ac
50 changed files with 131 additions and 131 deletions

View file

@ -669,7 +669,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="/chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -859,7 +859,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/chapter_hashing/hash_map/" class="md-nav__link"> <a href="/chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#41" class="md-skip"> <a href="#41-array" class="md-skip">
跳转至 跳转至
</a> </a>
@ -744,7 +744,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked_list/" class="md-nav__link"> <a href="../linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -934,7 +934,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1615,7 +1615,7 @@
<h1 id="41">4.1. &nbsp; 数组<a class="headerlink" href="#41" title="Permanent link">&para;</a></h1> <h1 id="41-array">4.1. &nbsp; 数组Array<a class="headerlink" href="#41-array" title="Permanent link">&para;</a></h1>
<p>「数组 Array」是一种将 <strong>相同类型元素</strong> 存储在 <strong>连续内存空间</strong> 的数据结构,将元素在数组中的位置称为元素的「索引 Index」。</p> <p>「数组 Array」是一种将 <strong>相同类型元素</strong> 存储在 <strong>连续内存空间</strong> 的数据结构,将元素在数组中的位置称为元素的「索引 Index」。</p>
<p><img alt="数组定义与存储方式" src="../array.assets/array_definition.png" /></p> <p><img alt="数组定义与存储方式" src="../array.assets/array_definition.png" /></p>
<p align="center"> Fig. 数组定义与存储方式 </p> <p align="center"> Fig. 数组定义与存储方式 </p>
@ -2527,13 +2527,13 @@
<a href="../linked_list/" class="md-footer__link md-footer__link--next" aria-label="下一页: 4.2. &amp;nbsp; 链表LinkedList" rel="next"> <a href="../linked_list/" class="md-footer__link md-footer__link--next" aria-label="下一页: 4.2. &amp;nbsp; 链表Linked List" rel="next">
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
下一页 下一页
</span> </span>
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</div> </div>
</div> </div>
<div class="md-footer__button md-icon"> <div class="md-footer__button md-icon">

View file

@ -25,7 +25,7 @@
<title>4.2.   链表LinkedList - Hello 算法</title> <title>4.2.   链表Linked List - Hello 算法</title>
@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#42" class="md-skip"> <a href="#42-linked-list" class="md-skip">
跳转至 跳转至
</a> </a>
@ -111,7 +111,7 @@
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</span> </span>
</div> </div>
@ -691,12 +691,12 @@
<label class="md-nav__link md-nav__link--active" for="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
@ -934,7 +934,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1615,7 +1615,7 @@
<h1 id="42">4.2. &nbsp; 链表<a class="headerlink" href="#42" title="Permanent link">&para;</a></h1> <h1 id="42-linked-list">4.2. &nbsp; 链表Linked List<a class="headerlink" href="#42-linked-list" title="Permanent link">&para;</a></h1>
<div class="admonition note"> <div class="admonition note">
<p class="admonition-title">引言</p> <p class="admonition-title">引言</p>
<p>内存空间是所有程序的公共资源,排除已占用的内存,空闲内存往往是散落在内存各处的。我们知道,存储数组需要内存空间连续,当我们需要申请一个很大的数组时,系统不一定存在这么大的连续内存空间。而链表则更加灵活,不需要内存是连续的,只要剩余内存空间大小够用即可。</p> <p>内存空间是所有程序的公共资源,排除已占用的内存,空闲内存往往是散落在内存各处的。我们知道,存储数组需要内存空间连续,当我们需要申请一个很大的数组时,系统不一定存在这么大的连续内存空间。而链表则更加灵活,不需要内存是连续的,只要剩余内存空间大小够用即可。</p>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#43" class="md-skip"> <a href="#43-list" class="md-skip">
跳转至 跳转至
</a> </a>
@ -682,7 +682,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked_list/" class="md-nav__link"> <a href="../linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -920,7 +920,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1587,7 +1587,7 @@
<h1 id="43">4.3. &nbsp; 列表<a class="headerlink" href="#43" title="Permanent link">&para;</a></h1> <h1 id="43-list">4.3. &nbsp; 列表List<a class="headerlink" href="#43-list" title="Permanent link">&para;</a></h1>
<p><strong>由于长度不可变,数组的实用性大大降低</strong>。在很多情况下,我们事先并不知道会输入多少数据,这就为数组长度的选择带来了很大困难。长度选小了,需要在添加数据中频繁地扩容数组;长度选大了,又造成内存空间的浪费。</p> <p><strong>由于长度不可变,数组的实用性大大降低</strong>。在很多情况下,我们事先并不知道会输入多少数据,这就为数组长度的选择带来了很大困难。长度选小了,需要在添加数据中频繁地扩容数组;长度选大了,又造成内存空间的浪费。</p>
<p>为了解决此问题,诞生了一种被称为「列表 List」的数据结构。列表可以被理解为长度可变的数组因此也常被称为「动态数组 Dynamic Array」。列表基于数组实现继承了数组的优点同时还可以在程序运行中实时扩容。在列表中我们可以自由地添加元素而不用担心超过容量限制。</p> <p>为了解决此问题,诞生了一种被称为「列表 List」的数据结构。列表可以被理解为长度可变的数组因此也常被称为「动态数组 Dynamic Array」。列表基于数组实现继承了数组的优点同时还可以在程序运行中实时扩容。在列表中我们可以自由地添加元素而不用担心超过容量限制。</p>
<h2 id="431">4.3.1. &nbsp; 列表常用操作<a class="headerlink" href="#431" title="Permanent link">&para;</a></h2> <h2 id="431">4.3.1. &nbsp; 列表常用操作<a class="headerlink" href="#431" title="Permanent link">&para;</a></h2>
@ -3207,7 +3207,7 @@
<nav class="md-footer__inner md-grid" aria-label="页脚" > <nav class="md-footer__inner md-grid" aria-label="页脚" >
<a href="../linked_list/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 4.2. &amp;nbsp; 链表LinkedList" rel="prev"> <a href="../linked_list/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 4.2. &amp;nbsp; 链表Linked List" rel="prev">
<div class="md-footer__button md-icon"> <div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</div> </div>
@ -3216,7 +3216,7 @@
<span class="md-footer__direction"> <span class="md-footer__direction">
上一页 上一页
</span> </span>
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</div> </div>
</div> </div>
</a> </a>

View file

@ -682,7 +682,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../linked_list/" class="md-nav__link"> <a href="../linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -913,7 +913,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -757,7 +757,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -947,7 +947,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -778,7 +778,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -968,7 +968,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -743,7 +743,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -933,7 +933,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -737,7 +737,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -927,7 +927,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -833,7 +833,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -1023,7 +1023,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -730,7 +730,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -920,7 +920,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -757,7 +757,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -947,7 +947,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -692,7 +692,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -882,7 +882,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#91" class="md-skip"> <a href="#91-graph" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1655,7 +1655,7 @@
<h1 id="91">9.1. &nbsp;<a class="headerlink" href="#91" title="Permanent link">&para;</a></h1> <h1 id="91-graph">9.1. &nbsp;Graph<a class="headerlink" href="#91-graph" title="Permanent link">&para;</a></h1>
<p>「图 Graph」是一种非线性数据结构由「顶点 Vertex」和「边 Edge」组成。我们可将图 <span class="arithmatex">\(G\)</span> 抽象地表示为一组顶点 <span class="arithmatex">\(V\)</span> 和一组边 <span class="arithmatex">\(E\)</span> 的集合。例如,以下表示一个包含 5 个顶点和 7 条边的图</p> <p>「图 Graph」是一种非线性数据结构由「顶点 Vertex」和「边 Edge」组成。我们可将图 <span class="arithmatex">\(G\)</span> 抽象地表示为一组顶点 <span class="arithmatex">\(V\)</span> 和一组边 <span class="arithmatex">\(E\)</span> 的集合。例如,以下表示一个包含 5 个顶点和 7 条边的图</p>
<div class="arithmatex">\[ <div class="arithmatex">\[
\begin{aligned} \begin{aligned}

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -872,7 +872,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../hash_map/" class="md-nav__link"> <a href="../hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1776,7 +1776,7 @@
<nav class="md-footer__inner md-grid" aria-label="页脚" > <nav class="md-footer__inner md-grid" aria-label="页脚" >
<a href="../hash_map/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 6.1. &amp;nbsp; 哈希表HashMap" rel="prev"> <a href="../hash_map/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 6.1. &amp;nbsp; 哈希表Hash Map" rel="prev">
<div class="md-footer__button md-icon"> <div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</div> </div>
@ -1785,7 +1785,7 @@
<span class="md-footer__direction"> <span class="md-footer__direction">
上一页 上一页
</span> </span>
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</div> </div>
</div> </div>
</a> </a>

View file

@ -25,7 +25,7 @@
<title>6.1.   哈希表HashMap - Hello 算法</title> <title>6.1.   哈希表Hash Map - Hello 算法</title>
@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#61" class="md-skip"> <a href="#61-hash-map" class="md-skip">
跳转至 跳转至
</a> </a>
@ -111,7 +111,7 @@
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</span> </span>
</div> </div>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -881,12 +881,12 @@
<label class="md-nav__link md-nav__link--active" for="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
<span class="md-nav__icon md-icon"></span> <span class="md-nav__icon md-icon"></span>
</label> </label>
<a href="./" class="md-nav__link md-nav__link--active"> <a href="./" class="md-nav__link md-nav__link--active">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
@ -1615,7 +1615,7 @@
<h1 id="61">6.1. &nbsp; 哈希表<a class="headerlink" href="#61" title="Permanent link">&para;</a></h1> <h1 id="61-hash-map">6.1. &nbsp; 哈希表Hash Map<a class="headerlink" href="#61-hash-map" title="Permanent link">&para;</a></h1>
<p>哈希表通过建立「键 key」和「值 value」之间的映射实现高效的元素查找。具体地输入一个 key ,在哈希表中查询并获取 value ,时间复杂度为 <span class="arithmatex">\(O(1)\)</span></p> <p>哈希表通过建立「键 key」和「值 value」之间的映射实现高效的元素查找。具体地输入一个 key ,在哈希表中查询并获取 value ,时间复杂度为 <span class="arithmatex">\(O(1)\)</span></p>
<p>例如,给定一个包含 <span class="arithmatex">\(n\)</span> 个学生的数据库,每个学生有“姓名 <code>name</code> ”和“学号 <code>id</code> ”两项数据,希望实现一个查询功能:<strong>输入一个学号,返回对应的姓名</strong>,则可以使用哈希表实现。</p> <p>例如,给定一个包含 <span class="arithmatex">\(n\)</span> 个学生的数据库,每个学生有“姓名 <code>name</code> ”和“学号 <code>id</code> ”两项数据,希望实现一个查询功能:<strong>输入一个学号,返回对应的姓名</strong>,则可以使用哈希表实现。</p>
<p><img alt="哈希表的抽象表示" src="../hash_map.assets/hash_map.png" /></p> <p><img alt="哈希表的抽象表示" src="../hash_map.assets/hash_map.png" /></p>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -872,7 +872,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../hash_map/" class="md-nav__link"> <a href="../hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#81" class="md-skip"> <a href="#81-heap" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1683,7 +1683,7 @@
<h1 id="81">8.1. &nbsp;<a class="headerlink" href="#81" title="Permanent link">&para;</a></h1> <h1 id="81-heap">8.1. &nbsp;Heap<a class="headerlink" href="#81-heap" title="Permanent link">&para;</a></h1>
<p>「堆 Heap」是一棵限定条件下的「完全二叉树」。根据成立条件堆主要分为两种类型</p> <p>「堆 Heap」是一棵限定条件下的「完全二叉树」。根据成立条件堆主要分为两种类型</p>
<ul> <ul>
<li>「大顶堆 Max Heap」任意结点的值 <span class="arithmatex">\(\geq\)</span> 其子结点的值;</li> <li>「大顶堆 Max Heap」任意结点的值 <span class="arithmatex">\(\geq\)</span> 其子结点的值;</li>

View file

@ -692,7 +692,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -882,7 +882,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -737,7 +737,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -927,7 +927,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -776,7 +776,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -966,7 +966,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -737,7 +737,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -927,7 +927,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -779,7 +779,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -969,7 +969,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -771,7 +771,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -961,7 +961,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -678,7 +678,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -868,7 +868,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#53" class="md-skip"> <a href="#53-deque" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -940,7 +940,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1627,7 +1627,7 @@
<h1 id="53">5.3. &nbsp; 双向队列<a class="headerlink" href="#53" title="Permanent link">&para;</a></h1> <h1 id="53-deque">5.3. &nbsp; 双向队列Deque<a class="headerlink" href="#53-deque" title="Permanent link">&para;</a></h1>
<p>对于队列,我们只能在头部删除或在尾部添加元素,而「双向队列 Deque」更加灵活在其头部和尾部都能执行元素添加或删除操作。</p> <p>对于队列,我们只能在头部删除或在尾部添加元素,而「双向队列 Deque」更加灵活在其头部和尾部都能执行元素添加或删除操作。</p>
<p><img alt="双向队列的操作" src="../deque.assets/deque_operations.png" /></p> <p><img alt="双向队列的操作" src="../deque.assets/deque_operations.png" /></p>
<p align="center"> Fig. 双向队列的操作 </p> <p align="center"> Fig. 双向队列的操作 </p>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#52" class="md-skip"> <a href="#52-queue" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -954,7 +954,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1655,7 +1655,7 @@
<h1 id="52">5.2. &nbsp; 队列<a class="headerlink" href="#52" title="Permanent link">&para;</a></h1> <h1 id="52-queue">5.2. &nbsp; 队列Queue<a class="headerlink" href="#52-queue" title="Permanent link">&para;</a></h1>
<p>「队列 Queue」是一种遵循「先入先出 first in, first out」数据操作规则的线性数据结构。顾名思义队列模拟的是排队现象即外面的人不断加入队列尾部而处于队列头部的人不断地离开。</p> <p>「队列 Queue」是一种遵循「先入先出 first in, first out」数据操作规则的线性数据结构。顾名思义队列模拟的是排队现象即外面的人不断加入队列尾部而处于队列头部的人不断地离开。</p>
<p>我们将队列头部称为「队首」,队列尾部称为「队尾」,将把元素加入队尾的操作称为「入队」,删除队首元素的操作称为「出队」。</p> <p>我们将队列头部称为「队首」,队列尾部称为「队尾」,将把元素加入队尾的操作称为「入队」,删除队首元素的操作称为「出队」。</p>
<p><img alt="队列的先入先出规则" src="../queue.assets/queue_operations.png" /></p> <p><img alt="队列的先入先出规则" src="../queue.assets/queue_operations.png" /></p>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#51" class="md-skip"> <a href="#51-stack" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -981,7 +981,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1709,7 +1709,7 @@
<h1 id="51">5.1. &nbsp;<a class="headerlink" href="#51" title="Permanent link">&para;</a></h1> <h1 id="51-stack">5.1. &nbsp;Stack<a class="headerlink" href="#51-stack" title="Permanent link">&para;</a></h1>
<p>「栈 Stack」是一种遵循「先入后出 first in, last out」数据操作规则的线性数据结构。我们可以将栈类比为放在桌面上的一摞盘子如果需要拿出底部的盘子则需要先将上面的盘子依次取出。</p> <p>「栈 Stack」是一种遵循「先入后出 first in, last out」数据操作规则的线性数据结构。我们可以将栈类比为放在桌面上的一摞盘子如果需要拿出底部的盘子则需要先将上面的盘子依次取出。</p>
<p>“盘子”是一种形象比喻,我们将盘子替换为任意一种元素(例如整数、字符、对象等),就得到了栈数据结构。</p> <p>“盘子”是一种形象比喻,我们将盘子替换为任意一种元素(例如整数、字符、对象等),就得到了栈数据结构。</p>
<p>我们将这一摞元素的顶部称为「栈顶」,将底部称为「栈底」,将把元素添加到栈顶的操作称为「入栈」,将删除栈顶元素的操作称为「出栈」。</p> <p>我们将这一摞元素的顶部称为「栈顶」,将底部称为「栈底」,将把元素添加到栈顶的操作称为「入栈」,将删除栈顶元素的操作称为「出栈」。</p>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -882,7 +882,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1628,13 +1628,13 @@
<a href="../../chapter_hashing/hash_map/" class="md-footer__link md-footer__link--next" aria-label="下一页: 6.1. &amp;nbsp; 哈希表HashMap" rel="next"> <a href="../../chapter_hashing/hash_map/" class="md-footer__link md-footer__link--next" aria-label="下一页: 6.1. &amp;nbsp; 哈希表Hash Map" rel="next">
<div class="md-footer__title"> <div class="md-footer__title">
<div class="md-ellipsis"> <div class="md-ellipsis">
<span class="md-footer__direction"> <span class="md-footer__direction">
下一页 下一页
</span> </span>
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</div> </div>
</div> </div>
<div class="md-footer__button md-icon"> <div class="md-footer__button md-icon">

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -79,7 +79,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#71" class="md-skip"> <a href="#71-binary-tree" class="md-skip">
跳转至 跳转至
</a> </a>
@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>
@ -1697,7 +1697,7 @@
<h1 id="71">7.1. &nbsp; 二叉树<a class="headerlink" href="#71" title="Permanent link">&para;</a></h1> <h1 id="71-binary-tree">7.1. &nbsp; 二叉树Binary Tree<a class="headerlink" href="#71-binary-tree" title="Permanent link">&para;</a></h1>
<p>「二叉树 Binary Tree」是一种非线性数据结构代表着祖先与后代之间的派生关系体现着“一分为二”的分治逻辑。类似于链表二叉树也是以结点为单位存储的结点包含「值」和两个「指针」。</p> <p>「二叉树 Binary Tree」是一种非线性数据结构代表着祖先与后代之间的派生关系体现着“一分为二”的分治逻辑。类似于链表二叉树也是以结点为单位存储的结点包含「值」和两个「指针」。</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:10"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><input id="__tabbed_1_4" name="__tabbed_1" type="radio" /><input id="__tabbed_1_5" name="__tabbed_1" type="radio" /><input id="__tabbed_1_6" name="__tabbed_1" type="radio" /><input id="__tabbed_1_7" name="__tabbed_1" type="radio" /><input id="__tabbed_1_8" name="__tabbed_1" type="radio" /><input id="__tabbed_1_9" name="__tabbed_1" type="radio" /><input id="__tabbed_1_10" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">Java</label><label for="__tabbed_1_2">C++</label><label for="__tabbed_1_3">Python</label><label for="__tabbed_1_4">Go</label><label for="__tabbed_1_5">JavaScript</label><label for="__tabbed_1_6">TypeScript</label><label for="__tabbed_1_7">C</label><label for="__tabbed_1_8">C#</label><label for="__tabbed_1_9">Swift</label><label for="__tabbed_1_10">Zig</label></div> <div class="tabbed-set tabbed-alternate" data-tabs="1:10"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><input id="__tabbed_1_4" name="__tabbed_1" type="radio" /><input id="__tabbed_1_5" name="__tabbed_1" type="radio" /><input id="__tabbed_1_6" name="__tabbed_1" type="radio" /><input id="__tabbed_1_7" name="__tabbed_1" type="radio" /><input id="__tabbed_1_8" name="__tabbed_1" type="radio" /><input id="__tabbed_1_9" name="__tabbed_1" type="radio" /><input id="__tabbed_1_10" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">Java</label><label for="__tabbed_1_2">C++</label><label for="__tabbed_1_3">Python</label><label for="__tabbed_1_4">Go</label><label for="__tabbed_1_5">JavaScript</label><label for="__tabbed_1_6">TypeScript</label><label for="__tabbed_1_7">C</label><label for="__tabbed_1_8">C#</label><label for="__tabbed_1_9">Swift</label><label for="__tabbed_1_10">Zig</label></div>
<div class="tabbed-content"> <div class="tabbed-content">

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -680,7 +680,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -870,7 +870,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link"> <a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

View file

@ -673,7 +673,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="chapter_array_and_linkedlist/linked_list/" class="md-nav__link"> <a href="chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList 4.2. &nbsp; 链表Linked List
</a> </a>
</li> </li>
@ -863,7 +863,7 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="chapter_hashing/hash_map/" class="md-nav__link"> <a href="chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap 6.1. &nbsp; 哈希表Hash Map
</a> </a>
</li> </li>

File diff suppressed because one or more lines are too long

Binary file not shown.