mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-15 08:26:06 +00:00
build
This commit is contained in:
@@ -410,19 +410,19 @@ comments: true
|
||||
|
||||
如圖 5-8 所示,我們將雙向鏈結串列的頭節點和尾節點視為雙向佇列的佇列首和佇列尾,同時實現在兩端新增和刪除節點的功能。
|
||||
|
||||
=== "LinkedListDeque"
|
||||
=== "<1>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "push_last()"
|
||||
=== "<2>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "push_first()"
|
||||
=== "<3>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "pop_last()"
|
||||
=== "<4>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "pop_first()"
|
||||
=== "<5>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
<p align="center"> 圖 5-8 基於鏈結串列實現雙向佇列的入列出列操作 </p>
|
||||
@@ -2158,19 +2158,19 @@ comments: true
|
||||
|
||||
如圖 5-9 所示,與基於陣列實現佇列類似,我們也可以使用環形陣列來實現雙向佇列。
|
||||
|
||||
=== "ArrayDeque"
|
||||
=== "<1>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "push_last()"
|
||||
=== "<2>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "push_first()"
|
||||
=== "<3>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "pop_last()"
|
||||
=== "<4>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
=== "pop_first()"
|
||||
=== "<5>"
|
||||
{ class="animation-figure" }
|
||||
|
||||
<p align="center"> 圖 5-9 基於陣列實現雙向佇列的入列出列操作 </p>
|
||||
|
||||
Reference in New Issue
Block a user