mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-09 13:51:48 +08:00
deploy
This commit is contained in:
@@ -3675,7 +3675,7 @@
|
||||
|
||||
<!-- Page content -->
|
||||
<h1 id="51-stack">5.1 Stack<a class="headerlink" href="#51-stack" title="Permanent link">¶</a></h1>
|
||||
<p>A "Stack" is a linear data structure that follows the principle of Last-In-First-Out (LIFO).</p>
|
||||
<p>A <u>stack</u> is a linear data structure that follows the principle of Last-In-First-Out (LIFO).</p>
|
||||
<p>We can compare a stack to a pile of plates on a table. To access the bottom plate, one must first remove the plates on top. By replacing the plates with various types of elements (such as integers, characters, objects, etc.), we obtain the data structure known as a stack.</p>
|
||||
<p>As shown in Figure 5-1, we refer to the top of the pile of elements as the "top of the stack" and the bottom as the "bottom of the stack." The operation of adding elements to the top of the stack is called "push," and the operation of removing the top element is called "pop."</p>
|
||||
<p><a class="glightbox" href="../stack.assets/stack_operations.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Stack's last-in-first-out rule" class="animation-figure" src="../stack.assets/stack_operations.png" /></a></p>
|
||||
@@ -5721,7 +5721,7 @@ aria-label="Footer"
|
||||
<div class="md-copyright">
|
||||
|
||||
<div class="md-copyright__highlight">
|
||||
Copyright © 2022-2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
Copyright © 2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user