Skip to content

Commit

Permalink
feat(all): 完善文章
Browse files Browse the repository at this point in the history
  • Loading branch information
李济芝 committed Nov 19, 2024
1 parent 0ac60ab commit 687227d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/posts/java/javaessay/java-data-structures/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@

<ul class="nav">

<ul class="nav">

<ul class="nav">


Expand All @@ -258,6 +260,8 @@

</ul>

</ul>




Expand Down Expand Up @@ -1448,7 +1452,7 @@ <h4 id="单向链表">单向链表</h4>
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="sc">&#39;}&#39;</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><h2 id="栈">栈</h2>
</span></span></span></code></pre></div><h3 id="栈">栈</h3>
<p>栈是一种线性数据结构,具有后进先出(LIFO, Last In First Out)的特性。元素只能在栈顶进行插入(入栈)和删除(出栈),栈底固定不变。常用的栈实现方式包括顺序栈(使用数组)和链式栈(使用链表)。</p>
<p>栈操作简单,只需在栈顶执行入栈和出栈操作,效率较高,适合处理后进先出的任务。顺序栈内存连续,访问速度快,链式栈动态分配内存,空间利用率高。</p>
<p>但是栈容量有限,顺序栈可能出现栈溢出问题,链式栈需要额外存储指针增加内存开销。由于只能操作栈顶,无法直接访问其他元素,灵活性较低。</p>
Expand Down

0 comments on commit 687227d

Please sign in to comment.