From 5b029ad63226dcc9a25915ac73c7b0ffee66aed0 Mon Sep 17 00:00:00 2001 From: krahets Date: Tue, 9 Jan 2024 04:42:07 +0800 Subject: [PATCH] deploy --- chapter_array_and_linkedlist/array/index.html | 27 +- .../linked_list/index.html | 19 +- chapter_array_and_linkedlist/list/index.html | 22 +- .../backtracking_algorithm/index.html | 16 +- .../n_queens_problem/index.html | 4 +- .../permutations_problem/index.html | 8 +- .../subset_sum_problem/index.html | 12 +- .../iteration_and_recursion/index.html | 32 +- .../space_complexity/index.html | 24 +- .../time_complexity/index.html | 48 +- .../basic_data_types/index.html | 3 +- .../binary_search_recur/index.html | 4 +- .../build_binary_tree_problem/index.html | 4 +- .../hanota_problem/index.html | 4 +- .../dp_problem_features/index.html | 12 +- .../dp_solution_pipeline/index.html | 16 +- .../edit_distance_problem/index.html | 8 +- .../intro_to_dynamic_programming/index.html | 20 +- .../knapsack_problem/index.html | 16 +- .../unbounded_knapsack_problem/index.html | 24 +- chapter_graph/graph_operations/index.html | 8 +- chapter_graph/graph_traversal/index.html | 8 +- .../fractional_knapsack_problem/index.html | 4 +- chapter_greedy/greedy_algorithm/index.html | 4 +- .../max_capacity_problem/index.html | 4 +- .../max_product_cutting_problem/index.html | 4 +- chapter_hashing/hash_algorithm/index.html | 7 +- chapter_hashing/hash_collision/index.html | 4 +- chapter_hashing/hash_map/index.html | 10 +- chapter_heap/build_heap/index.html | 4 +- chapter_heap/heap/index.html | 15 +- chapter_heap/top_k/index.html | 4 +- chapter_searching/binary_search/index.html | 8 +- .../binary_search_edge/index.html | 8 +- .../binary_search_insertion/index.html | 8 +- .../replace_linear_by_hashing/index.html | 8 +- chapter_sorting/bubble_sort/index.html | 8 +- chapter_sorting/bucket_sort/index.html | 4 +- chapter_sorting/counting_sort/index.html | 8 +- chapter_sorting/heap_sort/index.html | 4 +- chapter_sorting/insertion_sort/index.html | 4 +- chapter_sorting/merge_sort/index.html | 4 +- chapter_sorting/quick_sort/index.html | 16 +- chapter_sorting/radix_sort/index.html | 4 +- chapter_sorting/selection_sort/index.html | 4 +- chapter_stack_and_queue/deque/index.html | 77 +- chapter_stack_and_queue/queue/index.html | 11 +- chapter_stack_and_queue/stack/index.html | 15 +- .../array_representation_of_tree/index.html | 4 +- chapter_tree/binary_search_tree/index.html | 12 +- chapter_tree/binary_tree/index.html | 6 +- chapter_tree/binary_tree_traversal/index.html | 8 +- .../array/index.html | 76 +- .../linked_list/index.html | 16 +- .../list/index.html | 4 +- .../summary/index.html | 44 +- .../iteration_and_recursion/index.html | 32 +- .../space_complexity/index.html | 24 +- .../summary/index.html | 12 +- .../time_complexity/index.html | 48 +- en/chapter_data_structure/summary/index.html | 16 +- .../deque.assets/array_deque.png | Bin 0 -> 26632 bytes .../deque.assets/array_deque_pop_first.png | Bin 0 -> 20773 bytes .../deque.assets/array_deque_pop_last.png | Bin 0 -> 19326 bytes .../deque.assets/array_deque_push_first.png | Bin 0 -> 23951 bytes .../deque.assets/array_deque_push_last.png | Bin 0 -> 24537 bytes .../deque.assets/deque_operations.png | Bin 0 -> 22496 bytes .../deque.assets/linkedlist_deque.png | Bin 0 -> 16982 bytes .../linkedlist_deque_pop_first.png | Bin 0 -> 15899 bytes .../linkedlist_deque_pop_last.png | Bin 0 -> 17510 bytes .../linkedlist_deque_push_first.png | Bin 0 -> 20676 bytes .../linkedlist_deque_push_last.png | Bin 0 -> 19227 bytes en/chapter_stack_and_queue/deque/index.html | 1715 +++++++++++++++++ en/chapter_stack_and_queue/index.html | 1267 ++++++++++++ .../queue.assets/array_queue.png | Bin 0 -> 23213 bytes .../queue.assets/array_queue_pop.png | Bin 0 -> 19735 bytes .../queue.assets/array_queue_push.png | Bin 0 -> 23133 bytes .../queue.assets/linkedlist_queue.png | Bin 0 -> 14778 bytes .../queue.assets/linkedlist_queue_pop.png | Bin 0 -> 15661 bytes .../queue.assets/linkedlist_queue_push.png | Bin 0 -> 18687 bytes .../queue.assets/queue_operations.png | Bin 0 -> 18364 bytes en/chapter_stack_and_queue/queue/index.html | 1678 ++++++++++++++++ .../stack.assets/array_stack.png | Bin 0 -> 15928 bytes .../stack.assets/array_stack_pop.png | Bin 0 -> 15681 bytes .../stack.assets/array_stack_push.png | Bin 0 -> 17586 bytes .../stack.assets/linkedlist_stack.png | Bin 0 -> 14814 bytes .../stack.assets/linkedlist_stack_pop.png | Bin 0 -> 15689 bytes .../stack.assets/linkedlist_stack_push.png | Bin 0 -> 18725 bytes .../stack.assets/stack_operations.png | Bin 0 -> 17743 bytes en/chapter_stack_and_queue/stack/index.html | 1687 ++++++++++++++++ en/chapter_stack_and_queue/summary/index.html | 1307 +++++++++++++ en/search/search_index.json | 2 +- en/sitemap.xml | 79 +- en/sitemap.xml.gz | Bin 452 -> 476 bytes en/stylesheets/extra.css | 10 + search/search_index.json | 2 +- sitemap.xml | 208 +- sitemap.xml.gz | Bin 999 -> 998 bytes stylesheets/extra.css | 10 + 99 files changed, 8262 insertions(+), 595 deletions(-) create mode 100644 en/chapter_stack_and_queue/deque.assets/array_deque.png create mode 100644 en/chapter_stack_and_queue/deque.assets/array_deque_pop_first.png create mode 100644 en/chapter_stack_and_queue/deque.assets/array_deque_pop_last.png create mode 100644 en/chapter_stack_and_queue/deque.assets/array_deque_push_first.png create mode 100644 en/chapter_stack_and_queue/deque.assets/array_deque_push_last.png create mode 100644 en/chapter_stack_and_queue/deque.assets/deque_operations.png create mode 100644 en/chapter_stack_and_queue/deque.assets/linkedlist_deque.png create mode 100644 en/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_first.png create mode 100644 en/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_last.png create mode 100644 en/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_first.png create mode 100644 en/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_last.png create mode 100644 en/chapter_stack_and_queue/deque/index.html create mode 100644 en/chapter_stack_and_queue/index.html create mode 100644 en/chapter_stack_and_queue/queue.assets/array_queue.png create mode 100644 en/chapter_stack_and_queue/queue.assets/array_queue_pop.png create mode 100644 en/chapter_stack_and_queue/queue.assets/array_queue_push.png create mode 100644 en/chapter_stack_and_queue/queue.assets/linkedlist_queue.png create mode 100644 en/chapter_stack_and_queue/queue.assets/linkedlist_queue_pop.png create mode 100644 en/chapter_stack_and_queue/queue.assets/linkedlist_queue_push.png create mode 100644 en/chapter_stack_and_queue/queue.assets/queue_operations.png create mode 100644 en/chapter_stack_and_queue/queue/index.html create mode 100644 en/chapter_stack_and_queue/stack.assets/array_stack.png create mode 100644 en/chapter_stack_and_queue/stack.assets/array_stack_pop.png create mode 100644 en/chapter_stack_and_queue/stack.assets/array_stack_push.png create mode 100644 en/chapter_stack_and_queue/stack.assets/linkedlist_stack.png create mode 100644 en/chapter_stack_and_queue/stack.assets/linkedlist_stack_pop.png create mode 100644 en/chapter_stack_and_queue/stack.assets/linkedlist_stack_push.png create mode 100644 en/chapter_stack_and_queue/stack.assets/stack_operations.png create mode 100644 en/chapter_stack_and_queue/stack/index.html create mode 100644 en/chapter_stack_and_queue/summary/index.html diff --git a/chapter_array_and_linkedlist/array/index.html b/chapter_array_and_linkedlist/array/index.html index bf910710d..2fcce81e7 100644 --- a/chapter_array_and_linkedlist/array/index.html +++ b/chapter_array_and_linkedlist/array/index.html @@ -3763,7 +3763,8 @@
可视化运行 -

+

+全屏观看 >

2.   访问元素

数组元素被存储在连续的内存空间中,这意味着计算数组元素的内存地址非常容易。给定数组内存地址(首元素内存地址)和某个元素的索引,我们可以使用图 4-2 所示的公式计算得到该元素的内存地址,从而直接访问该元素。

@@ -3910,8 +3911,8 @@
可视化运行 -

-全屏观看 >

+

+全屏观看 >

3.   插入元素

数组元素在内存中是“紧挨着的”,它们之间没有空间再存放任何数据。如图 4-3 所示,如果想在数组中间插入一个元素,则需要将该元素之后的所有元素都向后移动一位,之后再把元素赋值给该索引。

@@ -4068,8 +4069,8 @@
可视化运行 -

-全屏观看 >

+

+全屏观看 >

4.   删除元素

同理,如图 4-4 所示,若想删除索引 \(i\) 处的元素,则需要把索引 \(i\) 之后的元素都向前移动一位。

@@ -4203,8 +4204,8 @@
可视化运行 -

-全屏观看 >

+

+全屏观看 >

总的来看,数组的插入与删除操作有以下缺点。