2022-11-04 19:09:51 +08:00
|
|
|
# Project information
|
2022-11-08 02:58:42 +08:00
|
|
|
site_name: Hello 算法
|
2022-11-25 02:04:38 +08:00
|
|
|
site_url: https://www.hello-algo.com/
|
2022-11-04 19:09:51 +08:00
|
|
|
site_author: Krahets
|
2023-06-21 19:39:15 +08:00
|
|
|
site_description: 动画图解、一键运行的数据结构与算法教程
|
2023-02-06 23:23:21 +08:00
|
|
|
docs_dir: build
|
2022-11-04 19:09:51 +08:00
|
|
|
# Repository
|
2022-11-08 02:58:42 +08:00
|
|
|
repo_name: krahets/hello-algo
|
|
|
|
repo_url: https://github.com/krahets/hello-algo
|
2023-02-06 23:23:21 +08:00
|
|
|
edit_uri: https://github.com/krahets/hello-algo/tree/main/docs/
|
2023-07-26 11:56:32 +08:00
|
|
|
version: 1.0.0b4
|
2022-11-04 19:09:51 +08:00
|
|
|
|
|
|
|
# Copyright
|
2023-02-11 02:48:58 +08:00
|
|
|
copyright: Copyright © 2023 Krahets
|
2022-11-04 19:09:51 +08:00
|
|
|
|
|
|
|
# Configuration
|
|
|
|
theme:
|
|
|
|
name: material
|
2023-02-06 23:23:21 +08:00
|
|
|
custom_dir: build/overrides
|
2022-11-22 04:17:46 +08:00
|
|
|
language: zh
|
2022-11-04 19:09:51 +08:00
|
|
|
features:
|
2022-12-14 04:24:06 +08:00
|
|
|
# - announce.dismiss
|
|
|
|
- content.action.edit
|
|
|
|
# - content.action.view
|
2022-11-04 19:09:51 +08:00
|
|
|
- content.code.annotate
|
2022-12-11 19:56:33 +08:00
|
|
|
- content.code.copy
|
2022-11-15 04:55:19 +08:00
|
|
|
- content.tabs.link
|
2022-11-04 19:09:51 +08:00
|
|
|
- content.tooltips
|
|
|
|
# - header.autohide
|
2022-11-12 22:48:46 +08:00
|
|
|
# - navigation.expand
|
2022-11-04 19:09:51 +08:00
|
|
|
- navigation.indexes
|
2023-07-17 20:23:46 +08:00
|
|
|
- navigation.instant
|
2022-11-04 19:09:51 +08:00
|
|
|
# - navigation.prune
|
2023-06-30 04:49:03 +08:00
|
|
|
# - navigation.sections
|
2022-11-04 19:09:51 +08:00
|
|
|
# - navigation.tabs
|
|
|
|
# - navigation.tabs.sticky
|
2023-01-06 03:13:06 +08:00
|
|
|
- navigation.top
|
2022-12-15 01:12:03 +08:00
|
|
|
- navigation.footer
|
2022-11-04 19:09:51 +08:00
|
|
|
- navigation.tracking
|
|
|
|
- search.highlight
|
|
|
|
- search.share
|
|
|
|
- search.suggest
|
|
|
|
- toc.follow
|
|
|
|
# - toc.integrate
|
|
|
|
palette:
|
|
|
|
- scheme: default
|
|
|
|
primary: white
|
|
|
|
# accent: indigo
|
|
|
|
toggle:
|
2023-07-19 01:45:14 +08:00
|
|
|
icon: material/theme-light-dark
|
2022-11-04 19:09:51 +08:00
|
|
|
name: Switch to dark mode
|
|
|
|
- scheme: slate
|
2023-06-18 04:39:20 +08:00
|
|
|
primary: grey
|
2022-11-04 19:09:51 +08:00
|
|
|
# accent: indigo
|
|
|
|
toggle:
|
2023-07-19 01:45:14 +08:00
|
|
|
icon: material/theme-light-dark
|
2022-11-04 19:09:51 +08:00
|
|
|
name: Switch to light mode
|
|
|
|
font:
|
2022-12-14 04:24:06 +08:00
|
|
|
text: Noto Sans SC
|
|
|
|
code: Fira Code
|
2022-11-04 19:09:51 +08:00
|
|
|
favicon: assets/images/favicon.png
|
2022-11-17 02:48:17 +08:00
|
|
|
logo: assets/images/logo.png
|
2022-11-22 04:17:46 +08:00
|
|
|
icon:
|
|
|
|
logo: logo
|
|
|
|
repo: fontawesome/brands/github
|
2022-12-14 04:24:06 +08:00
|
|
|
edit: material/file-edit-outline
|
2022-11-04 19:09:51 +08:00
|
|
|
|
|
|
|
extra:
|
|
|
|
social:
|
2023-03-10 02:06:29 +08:00
|
|
|
- icon: fontawesome/brands/github
|
2022-11-04 19:09:51 +08:00
|
|
|
link: https://github.com/krahets
|
2023-03-10 02:06:29 +08:00
|
|
|
- icon: fontawesome/brands/twitter
|
2022-11-04 19:09:51 +08:00
|
|
|
link: https://twitter.com/krahets
|
2023-03-10 02:06:29 +08:00
|
|
|
- icon: fontawesome/solid/code
|
2022-11-22 04:17:46 +08:00
|
|
|
link: https://leetcode.cn/u/jyd/
|
2022-11-25 13:01:14 +08:00
|
|
|
generator: false
|
2023-07-17 17:54:48 +08:00
|
|
|
status:
|
|
|
|
new: 最近添加
|
2022-11-04 19:09:51 +08:00
|
|
|
|
|
|
|
# Plugins
|
|
|
|
plugins:
|
|
|
|
- search
|
|
|
|
|
|
|
|
# Extensions
|
|
|
|
markdown_extensions:
|
|
|
|
- abbr
|
|
|
|
- admonition
|
|
|
|
- attr_list
|
|
|
|
- def_list
|
|
|
|
- footnotes
|
|
|
|
- md_in_html
|
|
|
|
- toc:
|
|
|
|
permalink: true
|
|
|
|
- pymdownx.arithmatex:
|
|
|
|
generic: true
|
|
|
|
- pymdownx.betterem:
|
|
|
|
smart_enable: all
|
|
|
|
- pymdownx.caret
|
|
|
|
- pymdownx.details
|
|
|
|
# - pymdownx.emoji:
|
|
|
|
# emoji_index: !!python/name:materialx.emoji.twemoji
|
2022-11-24 01:12:14 +08:00
|
|
|
# emoji_generator: !!python/name:materialx.emoji.to_svg
|
2022-11-04 19:09:51 +08:00
|
|
|
- pymdownx.highlight:
|
|
|
|
anchor_linenums: true
|
|
|
|
- pymdownx.inlinehilite
|
|
|
|
- pymdownx.snippets
|
|
|
|
- pymdownx.superfences
|
|
|
|
- pymdownx.keys
|
|
|
|
# - pymdownx.magiclink:
|
|
|
|
# repo_url_shorthand: true
|
|
|
|
# user: squidfunk
|
|
|
|
# repo: mkdocs-material
|
|
|
|
- pymdownx.mark
|
|
|
|
- pymdownx.smartsymbols
|
|
|
|
- pymdownx.tabbed:
|
|
|
|
alternate_style: true
|
|
|
|
- pymdownx.tasklist:
|
|
|
|
custom_checkbox: true
|
|
|
|
- pymdownx.tilde
|
|
|
|
|
|
|
|
extra_javascript:
|
|
|
|
- javascripts/mathjax.js
|
|
|
|
- https://polyfill.io/v3/polyfill.min.js?features=es6
|
|
|
|
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
|
2023-07-17 20:23:46 +08:00
|
|
|
# - javascripts/katex.js
|
|
|
|
# - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js
|
|
|
|
# - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/auto-render.min.js
|
|
|
|
|
2022-11-04 19:09:51 +08:00
|
|
|
extra_css:
|
|
|
|
- stylesheets/extra.css
|
2023-07-17 20:23:46 +08:00
|
|
|
# - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css
|
2022-11-04 19:09:51 +08:00
|
|
|
|
|
|
|
# Page tree
|
|
|
|
nav:
|
2023-08-20 13:37:49 +08:00
|
|
|
- 第 0 章 前言:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/book-open-outline]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_preface/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 0.1 关于本书: chapter_preface/about_the_book.md
|
|
|
|
- 0.2 如何使用本书: chapter_preface/suggestions.md
|
|
|
|
- 0.3 小结: chapter_preface/summary.md
|
|
|
|
- 第 1 章 初识算法:
|
2023-07-19 16:09:27 +08:00
|
|
|
# [icon: material/calculator-variant-outline]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_introduction/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 1.1 算法无处不在: chapter_introduction/algorithms_are_everywhere.md
|
|
|
|
- 1.2 算法是什么: chapter_introduction/what_is_dsa.md
|
|
|
|
- 1.3 小结: chapter_introduction/summary.md
|
2023-08-21 03:57:09 +08:00
|
|
|
- 第 2 章 时空复杂度:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/timer-sand]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_computational_complexity/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 2.1 算法效率评估: chapter_computational_complexity/performance_evaluation.md
|
2023-08-25 02:22:57 +08:00
|
|
|
# [status: new]
|
2023-08-24 17:51:41 +08:00
|
|
|
- 2.2 迭代与递归: chapter_computational_complexity/iteration_and_recursion.md
|
|
|
|
- 2.3 时间复杂度: chapter_computational_complexity/time_complexity.md
|
|
|
|
- 2.4 空间复杂度: chapter_computational_complexity/space_complexity.md
|
|
|
|
- 2.5 小结: chapter_computational_complexity/summary.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 第 3 章 数据结构:
|
2023-07-19 16:09:27 +08:00
|
|
|
# [icon: material/shape-outline]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_data_structure/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 3.1 数据结构分类: chapter_data_structure/classification_of_data_structure.md
|
|
|
|
- 3.2 基本数据类型: chapter_data_structure/basic_data_types.md
|
|
|
|
- 3.3 数字编码 *: chapter_data_structure/number_encoding.md
|
|
|
|
- 3.4 字符编码 *: chapter_data_structure/character_encoding.md
|
|
|
|
- 3.5 小结: chapter_data_structure/summary.md
|
|
|
|
- 第 4 章 数组与链表:
|
2023-07-19 16:09:27 +08:00
|
|
|
# [icon: material/view-list-outline]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_array_and_linkedlist/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 4.1 数组: chapter_array_and_linkedlist/array.md
|
|
|
|
- 4.2 链表: chapter_array_and_linkedlist/linked_list.md
|
|
|
|
- 4.3 列表: chapter_array_and_linkedlist/list.md
|
|
|
|
- 4.4 小结: chapter_array_and_linkedlist/summary.md
|
|
|
|
- 第 5 章 栈与队列:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/stack-overflow]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_stack_and_queue/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 5.1 栈: chapter_stack_and_queue/stack.md
|
|
|
|
- 5.2 队列: chapter_stack_and_queue/queue.md
|
|
|
|
- 5.3 双向队列: chapter_stack_and_queue/deque.md
|
|
|
|
- 5.4 小结: chapter_stack_and_queue/summary.md
|
2023-08-21 03:57:09 +08:00
|
|
|
- 第 6 章 哈希表:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/table-search]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_hashing/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 6.1 哈希表: chapter_hashing/hash_map.md
|
|
|
|
- 6.2 哈希冲突: chapter_hashing/hash_collision.md
|
|
|
|
- 6.3 哈希算法: chapter_hashing/hash_algorithm.md
|
|
|
|
- 6.4 小结: chapter_hashing/summary.md
|
|
|
|
- 第 7 章 树:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/graph-outline]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_tree/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 7.1 二叉树: chapter_tree/binary_tree.md
|
|
|
|
- 7.2 二叉树遍历: chapter_tree/binary_tree_traversal.md
|
|
|
|
- 7.3 二叉树数组表示: chapter_tree/array_representation_of_tree.md
|
|
|
|
- 7.4 二叉搜索树: chapter_tree/binary_search_tree.md
|
|
|
|
- 7.5 AVL 树 *: chapter_tree/avl_tree.md
|
|
|
|
- 7.6 小结: chapter_tree/summary.md
|
|
|
|
- 第 8 章 堆:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/family-tree]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_heap/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 8.1 堆: chapter_heap/heap.md
|
|
|
|
- 8.2 建堆操作: chapter_heap/build_heap.md
|
|
|
|
- 8.3 Top-K 问题: chapter_heap/top_k.md
|
|
|
|
- 8.4 小结: chapter_heap/summary.md
|
|
|
|
- 第 9 章 图:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/graphql]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_graph/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 9.1 图: chapter_graph/graph.md
|
|
|
|
- 9.2 图基础操作: chapter_graph/graph_operations.md
|
|
|
|
- 9.3 图的遍历: chapter_graph/graph_traversal.md
|
|
|
|
- 9.4 小结: chapter_graph/summary.md
|
|
|
|
- 第 10 章 搜索:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/text-search]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_searching/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 10.1 二分查找: chapter_searching/binary_search.md
|
2023-08-04 05:16:56 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 10.2 二分查找插入点: chapter_searching/binary_search_insertion.md
|
2023-08-04 05:16:56 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 10.3 二分查找边界: chapter_searching/binary_search_edge.md
|
|
|
|
- 10.4 哈希优化策略: chapter_searching/replace_linear_by_hashing.md
|
|
|
|
- 10.5 重识搜索算法: chapter_searching/searching_algorithm_revisited.md
|
|
|
|
- 10.6 小结: chapter_searching/summary.md
|
|
|
|
- 第 11 章 排序:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/sort-ascending]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_sorting/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 11.1 排序算法: chapter_sorting/sorting_algorithm.md
|
|
|
|
- 11.2 选择排序: chapter_sorting/selection_sort.md
|
|
|
|
- 11.3 冒泡排序: chapter_sorting/bubble_sort.md
|
|
|
|
- 11.4 插入排序: chapter_sorting/insertion_sort.md
|
|
|
|
- 11.5 快速排序: chapter_sorting/quick_sort.md
|
|
|
|
- 11.6 归并排序: chapter_sorting/merge_sort.md
|
|
|
|
- 11.7 堆排序: chapter_sorting/heap_sort.md
|
|
|
|
- 11.8 桶排序: chapter_sorting/bucket_sort.md
|
|
|
|
- 11.9 计数排序: chapter_sorting/counting_sort.md
|
|
|
|
- 11.10 基数排序: chapter_sorting/radix_sort.md
|
|
|
|
- 11.11 小结: chapter_sorting/summary.md
|
|
|
|
- 第 12 章 分治:
|
2023-07-19 16:09:27 +08:00
|
|
|
# [icon: material/set-split, status: new]
|
2023-07-16 04:24:04 +08:00
|
|
|
- chapter_divide_and_conquer/index.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 12.1 分治算法: chapter_divide_and_conquer/divide_and_conquer.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 12.2 分治搜索策略: chapter_divide_and_conquer/binary_search_recur.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 12.3 构建树问题: chapter_divide_and_conquer/build_binary_tree_problem.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 12.4 汉诺塔问题: chapter_divide_and_conquer/hanota_problem.md
|
2023-07-17 20:23:46 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 12.5 小结: chapter_divide_and_conquer/summary.md
|
|
|
|
- 第 13 章 回溯:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/map-marker-path]
|
2023-06-02 01:36:51 +08:00
|
|
|
- chapter_backtracking/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 13.1 回溯算法: chapter_backtracking/backtracking_algorithm.md
|
|
|
|
- 13.2 全排列问题: chapter_backtracking/permutations_problem.md
|
|
|
|
- 13.3 子集和问题: chapter_backtracking/subset_sum_problem.md
|
|
|
|
- 13.4 N 皇后问题: chapter_backtracking/n_queens_problem.md
|
|
|
|
- 13.5 小结: chapter_backtracking/summary.md
|
|
|
|
- 第 14 章 动态规划:
|
2023-07-17 20:23:46 +08:00
|
|
|
# [icon: material/table-pivot, status: new]
|
2023-06-30 04:31:43 +08:00
|
|
|
- chapter_dynamic_programming/index.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.1 初探动态规划: chapter_dynamic_programming/intro_to_dynamic_programming.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.2 DP 问题特性: chapter_dynamic_programming/dp_problem_features.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.3 DP 解题思路: chapter_dynamic_programming/dp_solution_pipeline.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.4 0-1 背包问题: chapter_dynamic_programming/knapsack_problem.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.5 完全背包问题: chapter_dynamic_programming/unbounded_knapsack_problem.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.6 编辑距离问题: chapter_dynamic_programming/edit_distance_problem.md
|
2023-07-17 17:54:48 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 14.7 小结: chapter_dynamic_programming/summary.md
|
|
|
|
- 第 15 章 贪心:
|
2023-07-20 18:26:54 +08:00
|
|
|
# [icon: material/head-heart-outline, status: new]
|
|
|
|
- chapter_greedy/index.md
|
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 15.1 贪心算法: chapter_greedy/greedy_algorithm.md
|
2023-07-20 18:26:54 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 15.2 分数背包问题: chapter_greedy/fractional_knapsack_problem.md
|
2023-07-21 15:16:51 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 15.3 最大容量问题: chapter_greedy/max_capacity_problem.md
|
2023-07-21 21:56:14 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 15.4 最大切分乘积问题: chapter_greedy/max_product_cutting_problem.md
|
2023-07-21 22:54:26 +08:00
|
|
|
# [status: new]
|
2023-08-20 13:37:49 +08:00
|
|
|
- 15.5 小结: chapter_greedy/summary.md
|
|
|
|
- 第 16 章 附录:
|
2023-07-17 17:54:48 +08:00
|
|
|
# [icon: material/help-circle-outline]
|
|
|
|
- chapter_appendix/index.md
|
2023-08-20 13:37:49 +08:00
|
|
|
- 16.1 编程环境安装: chapter_appendix/installation.md
|
|
|
|
- 16.2 一起参与创作: chapter_appendix/contribution.md
|
2022-11-17 02:48:17 +08:00
|
|
|
- 参考文献:
|
2022-11-22 04:17:46 +08:00
|
|
|
- chapter_reference/index.md
|