This commit is contained in:
krahets
2023-02-26 18:18:03 +08:00
parent 281b756ddf
commit e82934bc32
34 changed files with 150 additions and 229 deletions

View File

@@ -1642,9 +1642,7 @@
<h1 id="52">5.2. &nbsp; 队列<a class="headerlink" href="#52" title="Permanent link">&para;</a></h1>
<p>「队列 Queue」是一种遵循「先入先出 first in, first out」数据操作规则的线性数据结构。顾名思义队列模拟的是排队现象即外面的人不断加入队列尾部而处于队列头部的人不断地离开。</p>
<p>我们将队列头部称为「队首」,队列尾部称为「队尾」,将把元素加入队尾的操作称为「入队」,删除队首元素的操作称为「出队」。</p>
<p><img alt="queue_operations" src="../queue.assets/queue_operations.png" /></p>
<p align="center"> Fig. 队列的先入先出特性 </p>
<p><img alt="队列的先入先出规则" src="../queue.assets/queue_operations.png" /></p>
<h2 id="521">5.2.1. &nbsp; 队列常用操作<a class="headerlink" href="#521" title="Permanent link">&para;</a></h2>
<p>队列的常用操作见下表,方法名需根据特定语言来确定。</p>
<p align="center"> Table. 队列的常用操作 </p>