From b2e68ade25e80befff48d5157de2dc4c0e4f22dc Mon Sep 17 00:00:00 2001 From: krahets Date: Wed, 24 May 2023 16:35:41 +0800 Subject: [PATCH] deploy --- 404.html | 2 +- chapter_appendix/contribution/index.html | 2 +- chapter_appendix/installation/index.html | 2 +- chapter_array_and_linkedlist/array/index.html | 2 +- .../linked_list/index.html | 2 +- chapter_array_and_linkedlist/list/index.html | 2 +- .../summary/index.html | 2 +- .../backtracking_algorithm/index.html | 2 +- .../n_queens_problem/index.html | 2 +- .../permutations_problem/index.html | 2 +- .../performance_evaluation/index.html | 2 +- .../space_complexity/index.html | 2 +- .../summary/index.html | 2 +- .../time_complexity/index.html | 2 +- .../basic_data_types/index.html | 2 +- .../character_encoding/index.html | 2 +- .../index.html | 2 +- .../number_encoding/index.html | 2 +- chapter_data_structure/summary/index.html | 2 +- chapter_graph/graph/index.html | 2 +- chapter_graph/graph_operations/index.html | 2 +- chapter_graph/graph_traversal/index.html | 2 +- chapter_graph/summary/index.html | 2 +- chapter_hashing/hash_collision/index.html | 2 +- chapter_hashing/hash_map/index.html | 2 +- chapter_hashing/summary/index.html | 2 +- chapter_heap/build_heap/index.html | 2 +- chapter_heap/heap/index.html | 2 +- chapter_heap/summary/index.html | 2 +- .../algorithms_are_everywhere/index.html | 2 +- chapter_introduction/summary/index.html | 2 +- chapter_introduction/what_is_dsa/index.html | 2 +- chapter_preface/about_the_book/index.html | 2 +- chapter_preface/suggestions/index.html | 2 +- chapter_preface/summary/index.html | 2 +- chapter_reference/index.html | 2 +- chapter_searching/binary_search/index.html | 2 +- .../binary_search_edge/index.html | 2 +- .../replace_linear_by_hashing/index.html | 2 +- .../searching_algorithm_revisited/index.html | 9 +- chapter_searching/summary/index.html | 2 +- chapter_sorting/bubble_sort/index.html | 6 +- chapter_sorting/bucket_sort/index.html | 2 +- chapter_sorting/counting_sort/index.html | 2 +- chapter_sorting/heap_sort/index.html | 1913 +++++++++++++++++ chapter_sorting/insertion_sort/index.html | 2 +- chapter_sorting/merge_sort/index.html | 2 +- chapter_sorting/quick_sort/index.html | 2 +- chapter_sorting/radix_sort/index.html | 2 +- chapter_sorting/selection_sort/index.html | 53 +- chapter_sorting/sorting_algorithm/index.html | 6 +- chapter_sorting/summary/index.html | 2 +- chapter_stack_and_queue/deque/index.html | 2 +- chapter_stack_and_queue/queue/index.html | 2 +- chapter_stack_and_queue/stack/index.html | 2 +- chapter_stack_and_queue/summary/index.html | 2 +- .../array_representation_of_tree/index.html | 2 +- chapter_tree/avl_tree/index.html | 2 +- chapter_tree/binary_search_tree/index.html | 2 +- chapter_tree/binary_tree/index.html | 2 +- chapter_tree/binary_tree_traversal/index.html | 2 +- chapter_tree/summary/index.html | 2 +- index.html | 2 +- search/search_index.json | 2 +- sitemap.xml | 127 +- sitemap.xml.gz | Bin 738 -> 743 bytes 66 files changed, 2077 insertions(+), 155 deletions(-) create mode 100644 chapter_sorting/heap_sort/index.html diff --git a/404.html b/404.html index a1aaf9467..af9eb7994 100644 --- a/404.html +++ b/404.html @@ -1436,7 +1436,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_appendix/contribution/index.html b/chapter_appendix/contribution/index.html index b8b3b4e5c..1b8c95654 100644 --- a/chapter_appendix/contribution/index.html +++ b/chapter_appendix/contribution/index.html @@ -1447,7 +1447,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_appendix/installation/index.html b/chapter_appendix/installation/index.html index be392bf4e..ed2b9099b 100644 --- a/chapter_appendix/installation/index.html +++ b/chapter_appendix/installation/index.html @@ -1447,7 +1447,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_array_and_linkedlist/array/index.html b/chapter_array_and_linkedlist/array/index.html index 4113e88c7..0a3151506 100644 --- a/chapter_array_and_linkedlist/array/index.html +++ b/chapter_array_and_linkedlist/array/index.html @@ -1511,7 +1511,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_array_and_linkedlist/linked_list/index.html b/chapter_array_and_linkedlist/linked_list/index.html index ef8a1555f..d83f23d5d 100644 --- a/chapter_array_and_linkedlist/linked_list/index.html +++ b/chapter_array_and_linkedlist/linked_list/index.html @@ -1511,7 +1511,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_array_and_linkedlist/list/index.html b/chapter_array_and_linkedlist/list/index.html index 8297a2dc5..680acd775 100644 --- a/chapter_array_and_linkedlist/list/index.html +++ b/chapter_array_and_linkedlist/list/index.html @@ -1497,7 +1497,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_array_and_linkedlist/summary/index.html b/chapter_array_and_linkedlist/summary/index.html index cb38c0843..1c5274947 100644 --- a/chapter_array_and_linkedlist/summary/index.html +++ b/chapter_array_and_linkedlist/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_backtracking/backtracking_algorithm/index.html b/chapter_backtracking/backtracking_algorithm/index.html index 3c1820fa8..7ff09ec14 100644 --- a/chapter_backtracking/backtracking_algorithm/index.html +++ b/chapter_backtracking/backtracking_algorithm/index.html @@ -1447,7 +1447,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_backtracking/n_queens_problem/index.html b/chapter_backtracking/n_queens_problem/index.html index 9c0dfb185..36b3d2bc1 100644 --- a/chapter_backtracking/n_queens_problem/index.html +++ b/chapter_backtracking/n_queens_problem/index.html @@ -1447,7 +1447,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_backtracking/permutations_problem/index.html b/chapter_backtracking/permutations_problem/index.html index 2f49b4e36..2290dcd61 100644 --- a/chapter_backtracking/permutations_problem/index.html +++ b/chapter_backtracking/permutations_problem/index.html @@ -1447,7 +1447,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_computational_complexity/performance_evaluation/index.html b/chapter_computational_complexity/performance_evaluation/index.html index 54c440eba..7a59bcb54 100644 --- a/chapter_computational_complexity/performance_evaluation/index.html +++ b/chapter_computational_complexity/performance_evaluation/index.html @@ -1524,7 +1524,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_computational_complexity/space_complexity/index.html b/chapter_computational_complexity/space_complexity/index.html index 64f0dfc1f..78907ce25 100644 --- a/chapter_computational_complexity/space_complexity/index.html +++ b/chapter_computational_complexity/space_complexity/index.html @@ -1552,7 +1552,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_computational_complexity/summary/index.html b/chapter_computational_complexity/summary/index.html index 202ea9eb2..3ab44a5b2 100644 --- a/chapter_computational_complexity/summary/index.html +++ b/chapter_computational_complexity/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_computational_complexity/time_complexity/index.html b/chapter_computational_complexity/time_complexity/index.html index 269e1c444..e4c4df7d6 100644 --- a/chapter_computational_complexity/time_complexity/index.html +++ b/chapter_computational_complexity/time_complexity/index.html @@ -1600,7 +1600,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_data_structure/basic_data_types/index.html b/chapter_data_structure/basic_data_types/index.html index bd3252db1..454316db6 100644 --- a/chapter_data_structure/basic_data_types/index.html +++ b/chapter_data_structure/basic_data_types/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_data_structure/character_encoding/index.html b/chapter_data_structure/character_encoding/index.html index ce13df3e4..d1cc8097f 100644 --- a/chapter_data_structure/character_encoding/index.html +++ b/chapter_data_structure/character_encoding/index.html @@ -1518,7 +1518,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_data_structure/classification_of_data_structure/index.html b/chapter_data_structure/classification_of_data_structure/index.html index 454b08595..d92b6dfbe 100644 --- a/chapter_data_structure/classification_of_data_structure/index.html +++ b/chapter_data_structure/classification_of_data_structure/index.html @@ -1497,7 +1497,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_data_structure/number_encoding/index.html b/chapter_data_structure/number_encoding/index.html index 37b5a9353..e6f909924 100644 --- a/chapter_data_structure/number_encoding/index.html +++ b/chapter_data_structure/number_encoding/index.html @@ -1497,7 +1497,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_data_structure/summary/index.html b/chapter_data_structure/summary/index.html index af07cec9e..f53708d01 100644 --- a/chapter_data_structure/summary/index.html +++ b/chapter_data_structure/summary/index.html @@ -1517,7 +1517,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_graph/graph/index.html b/chapter_graph/graph/index.html index 55b950287..d1ae42a4f 100644 --- a/chapter_graph/graph/index.html +++ b/chapter_graph/graph/index.html @@ -1531,7 +1531,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_graph/graph_operations/index.html b/chapter_graph/graph_operations/index.html index e7ccc0479..d1a52acba 100644 --- a/chapter_graph/graph_operations/index.html +++ b/chapter_graph/graph_operations/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_graph/graph_traversal/index.html b/chapter_graph/graph_traversal/index.html index 6e9559d95..7768dfc97 100644 --- a/chapter_graph/graph_traversal/index.html +++ b/chapter_graph/graph_traversal/index.html @@ -1537,7 +1537,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_graph/summary/index.html b/chapter_graph/summary/index.html index 6c0f76b0e..d9b6a4e1f 100644 --- a/chapter_graph/summary/index.html +++ b/chapter_graph/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_hashing/hash_collision/index.html b/chapter_hashing/hash_collision/index.html index 5f1cb8eef..84dc458ce 100644 --- a/chapter_hashing/hash_collision/index.html +++ b/chapter_hashing/hash_collision/index.html @@ -1524,7 +1524,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_hashing/hash_map/index.html b/chapter_hashing/hash_map/index.html index c1d257cb4..b981b06d7 100644 --- a/chapter_hashing/hash_map/index.html +++ b/chapter_hashing/hash_map/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_hashing/summary/index.html b/chapter_hashing/summary/index.html index 38e528228..a32d83ba8 100644 --- a/chapter_hashing/summary/index.html +++ b/chapter_hashing/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_heap/build_heap/index.html b/chapter_heap/build_heap/index.html index c91e571ca..5b5dd13f7 100644 --- a/chapter_heap/build_heap/index.html +++ b/chapter_heap/build_heap/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_heap/heap/index.html b/chapter_heap/heap/index.html index f69c6ad09..40596b007 100644 --- a/chapter_heap/heap/index.html +++ b/chapter_heap/heap/index.html @@ -1538,7 +1538,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_heap/summary/index.html b/chapter_heap/summary/index.html index 88d90cea5..474ed4c8c 100644 --- a/chapter_heap/summary/index.html +++ b/chapter_heap/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_introduction/algorithms_are_everywhere/index.html b/chapter_introduction/algorithms_are_everywhere/index.html index ba8888e8d..1e7ef1358 100644 --- a/chapter_introduction/algorithms_are_everywhere/index.html +++ b/chapter_introduction/algorithms_are_everywhere/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_introduction/summary/index.html b/chapter_introduction/summary/index.html index c058c92d8..c130d8066 100644 --- a/chapter_introduction/summary/index.html +++ b/chapter_introduction/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_introduction/what_is_dsa/index.html b/chapter_introduction/what_is_dsa/index.html index 223dc31c3..41ffa4e6b 100644 --- a/chapter_introduction/what_is_dsa/index.html +++ b/chapter_introduction/what_is_dsa/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_preface/about_the_book/index.html b/chapter_preface/about_the_book/index.html index 2fd706853..3d4e51424 100644 --- a/chapter_preface/about_the_book/index.html +++ b/chapter_preface/about_the_book/index.html @@ -1502,7 +1502,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_preface/suggestions/index.html b/chapter_preface/suggestions/index.html index aebe80596..b22c126ce 100644 --- a/chapter_preface/suggestions/index.html +++ b/chapter_preface/suggestions/index.html @@ -1518,7 +1518,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_preface/summary/index.html b/chapter_preface/summary/index.html index b7d6995ab..20d94b371 100644 --- a/chapter_preface/summary/index.html +++ b/chapter_preface/summary/index.html @@ -1459,7 +1459,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_reference/index.html b/chapter_reference/index.html index 4590ad1df..266ae081c 100644 --- a/chapter_reference/index.html +++ b/chapter_reference/index.html @@ -1445,7 +1445,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_searching/binary_search/index.html b/chapter_searching/binary_search/index.html index e5ed01dff..81087b43e 100644 --- a/chapter_searching/binary_search/index.html +++ b/chapter_searching/binary_search/index.html @@ -1497,7 +1497,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_searching/binary_search_edge/index.html b/chapter_searching/binary_search_edge/index.html index 21d43f6c1..9bf236dac 100644 --- a/chapter_searching/binary_search_edge/index.html +++ b/chapter_searching/binary_search_edge/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_searching/replace_linear_by_hashing/index.html b/chapter_searching/replace_linear_by_hashing/index.html index 500404802..85af715f1 100644 --- a/chapter_searching/replace_linear_by_hashing/index.html +++ b/chapter_searching/replace_linear_by_hashing/index.html @@ -1497,7 +1497,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • diff --git a/chapter_searching/searching_algorithm_revisited/index.html b/chapter_searching/searching_algorithm_revisited/index.html index 0c23961cb..f3e5b13d4 100644 --- a/chapter_searching/searching_algorithm_revisited/index.html +++ b/chapter_searching/searching_algorithm_revisited/index.html @@ -1504,7 +1504,7 @@
  • - 11.2.   选择排序 + 11.2.   选择排序(New)
  • @@ -1906,7 +1906,12 @@

    10.4.   重识搜索算法

    「搜索算法 Searching Algorithm」用于在数据结构(例如数组、链表、树或图)中搜索一个或一组满足特定条件的元素。

    -

    在前面的章节中,我们已经学习了数组、链表、树和图的遍历方法,也了解过哈希表和二叉搜索树等具有查询功能的复杂数据结构。因此,搜索算法对于我们来说并不陌生。在本节,我们将从更加系统的视角切入,重新审视搜索算法。

    +

    根据实现思路,搜索算法总体可分为两种:

    + +

    不难发现,这些知识点都已在前面的章节中介绍过,因此搜索算法对于我们来说并不陌生。在本节中,我们将从更加系统的视角切入,重新审视搜索算法。

    10.4.1.   暴力搜索

    暴力搜索通过遍历数据结构的每个元素来定位目标元素。