mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-12 07:26:07 +00:00
Add animation player (#1877)
* Add auto slide controller. * Fix the animation blocks. * renamed as animation_player * Bug fixes * Refine animation player controls
This commit is contained in:
@@ -399,19 +399,19 @@
|
||||
|
||||
如下圖所示,我們將雙向鏈結串列的頭節點和尾節點視為雙向佇列的佇列首和佇列尾,同時實現在兩端新增和刪除節點的功能。
|
||||
|
||||
=== "LinkedListDeque"
|
||||
=== "<1>"
|
||||

|
||||
|
||||
=== "push_last()"
|
||||
=== "<2>"
|
||||

|
||||
|
||||
=== "push_first()"
|
||||
=== "<3>"
|
||||

|
||||
|
||||
=== "pop_last()"
|
||||
=== "<4>"
|
||||

|
||||
|
||||
=== "pop_first()"
|
||||
=== "<5>"
|
||||

|
||||
|
||||
實現程式碼如下所示:
|
||||
@@ -424,19 +424,19 @@
|
||||
|
||||
如下圖所示,與基於陣列實現佇列類似,我們也可以使用環形陣列來實現雙向佇列。
|
||||
|
||||
=== "ArrayDeque"
|
||||
=== "<1>"
|
||||

|
||||
|
||||
=== "push_last()"
|
||||
=== "<2>"
|
||||

|
||||
|
||||
=== "push_first()"
|
||||
=== "<3>"
|
||||

|
||||
|
||||
=== "pop_last()"
|
||||
=== "<4>"
|
||||

|
||||
|
||||
=== "pop_first()"
|
||||
=== "<5>"
|
||||

|
||||
|
||||
在佇列的實現基礎上,僅需增加“佇列首入列”和“佇列尾出列”的方法:
|
||||
|
||||
Reference in New Issue
Block a user