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

@@ -79,7 +79,7 @@
<div data-md-component="skip">
<a href="#51" class="md-skip">
<a href="#51-stack" class="md-skip">
跳转至
</a>
@@ -680,7 +680,7 @@
<li class="md-nav__item">
<a href="../../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
4.2. &nbsp; 链表LinkedList
4.2. &nbsp; 链表Linked List
</a>
</li>
@@ -981,7 +981,7 @@
<li class="md-nav__item">
<a href="../../chapter_hashing/hash_map/" class="md-nav__link">
6.1. &nbsp; 哈希表HashMap
6.1. &nbsp; 哈希表Hash Map
</a>
</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>“盘子”是一种形象比喻,我们将盘子替换为任意一种元素(例如整数、字符、对象等),就得到了栈数据结构。</p>
<p>我们将这一摞元素的顶部称为「栈顶」,将底部称为「栈底」,将把元素添加到栈顶的操作称为「入栈」,将删除栈顶元素的操作称为「出栈」。</p>