# Project information site_name: Hello Algo site_url: https://www.hello-algo.com/en/ site_author: krahets site_description: A data structures and algorithms tutorial with animated illustrations and code you can run with one click docs_dir: ../build/en/docs site_dir: ../site/en # Repository repo_name: krahets/hello-algo repo_url: https://github.com/krahets/hello-algo edit_uri: tree/main/en/docs version: 1.3.0 # Copyright copyright: Copyright © 2026 krahets
The website content is licensed under CC BY-NC-SA 4.0 # Configuration theme: name: material custom_dir: ../build/overrides language: en font: text: Noto Sans code: JetBrains Mono features: # - announce.dismiss - content.action.edit # - content.action.view - content.code.annotate - content.code.copy - content.tabs.link - content.tooltips # - header.autohide # - navigation.expand - navigation.indexes # - navigation.instant # - navigation.prune # - navigation.sections # - navigation.tabs # - navigation.tabs.sticky - navigation.top - navigation.footer - navigation.tracking - search.highlight - search.share - search.suggest - toc.follow # - toc.integrate palette: - scheme: default primary: white accent: teal toggle: icon: material/theme-light-dark name: Switch to dark mode - scheme: slate primary: black accent: teal toggle: icon: material/theme-light-dark name: Switch to light mode favicon: assets/images/favicon.png logo: assets/images/logo.svg icon: logo: logo repo: fontawesome/brands/github edit: fontawesome/regular/pen-to-square extra: alternate: - name: 简体中文 link: / lang: zh - name: 繁體中文 link: /zh-hant/ lang: zh-Hant - name: English link: /en/ lang: en - name: 日本語 link: /ja/ lang: ja - name: Русский link: /ru/ lang: ru - name: 한국어 link: /ko/ lang: ko social: - icon: fontawesome/brands/github link: https://github.com/krahets - icon: fontawesome/brands/x-twitter link: https://twitter.com/krahets - icon: fontawesome/solid/code link: https://leetcode.cn/u/jyd/ generator: false status: new: Recently added # Plugins plugins: - search - glightbox: touchNavigation: true loop: false effect: zoom slide_effect: none width: 100% height: auto zoomable: true draggable: false auto_caption: false caption_position: bottom # Extensions markdown_extensions: abbr: {} admonition: {} attr_list: {} def_list: {} footnotes: {} md_in_html: {} toc: permalink: true pymdownx.arithmatex: generic: true pymdownx.betterem: smart_enable: underscore pymdownx.caret: {} pymdownx.details: {} # pymdownx.emoji: # emoji_index: !!python/name:materialx.emoji.twemoji # emoji_generator: !!python/name:materialx.emoji.to_svg 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://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js # - 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 extra_css: - stylesheets/extra.css # - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css # Page tree nav: - Foreword: - chapter_hello_algo/index.md - Chapter 0.   Preface: # [icon: material/book-open-outline] - chapter_preface/index.md - 0.1   About this book: chapter_preface/about_the_book.md - 0.2   How to use this book: chapter_preface/suggestions.md - 0.3   Summary: chapter_preface/summary.md - Chapter 1.   Getting to know algorithms: # [icon: material/calculator-variant-outline] - chapter_introduction/index.md - 1.1   Algorithms are everywhere: chapter_introduction/algorithms_are_everywhere.md - 1.2   What is an algorithm?: chapter_introduction/what_is_dsa.md - 1.3   Summary: chapter_introduction/summary.md - Chapter 2.   Complexity analysis: # [icon: material/timer-sand] - chapter_computational_complexity/index.md - 2.1   Evaluating algorithm efficiency: chapter_computational_complexity/performance_evaluation.md - 2.2   Iteration and recursion: chapter_computational_complexity/iteration_and_recursion.md - 2.3   Time complexity: chapter_computational_complexity/time_complexity.md - 2.4   Space complexity: chapter_computational_complexity/space_complexity.md - 2.5   Summary: chapter_computational_complexity/summary.md - 2.6   Exercises: chapter_computational_complexity/exercises.md - Chapter 3.   Data structures: # [icon: material/shape-outline] - chapter_data_structure/index.md - 3.1   Classifying data structures: chapter_data_structure/classification_of_data_structure.md - 3.2   Basic data types: chapter_data_structure/basic_data_types.md - 3.3   Number encoding *: chapter_data_structure/number_encoding.md - 3.4   Character encoding *: chapter_data_structure/character_encoding.md - 3.5   Summary: chapter_data_structure/summary.md - 3.6   Exercises: chapter_data_structure/exercises.md - Chapter 4.   Arrays and linked lists: # [icon: material/view-list-outline] - chapter_array_and_linkedlist/index.md - 4.1   Arrays: chapter_array_and_linkedlist/array.md - 4.2   Linked lists: chapter_array_and_linkedlist/linked_list.md - 4.3   Lists: chapter_array_and_linkedlist/list.md - 4.4   Memory and cache *: chapter_array_and_linkedlist/ram_and_cache.md - 4.5   Summary: chapter_array_and_linkedlist/summary.md - 4.6   Exercises: chapter_array_and_linkedlist/exercises.md - Chapter 5.   Stacks and queues: # [icon: material/stack-overflow] - chapter_stack_and_queue/index.md - 5.1   Stacks: chapter_stack_and_queue/stack.md - 5.2   Queues: chapter_stack_and_queue/queue.md - 5.3   Deques: chapter_stack_and_queue/deque.md - 5.4   Summary: chapter_stack_and_queue/summary.md - 5.5   Exercises: chapter_stack_and_queue/exercises.md - Chapter 6.   Hash tables: # [icon: material/table-search] - chapter_hashing/index.md - 6.1   Hash tables: chapter_hashing/hash_map.md - 6.2   Hash collisions: chapter_hashing/hash_collision.md - 6.3   Hash algorithms: chapter_hashing/hash_algorithm.md - 6.4   Summary: chapter_hashing/summary.md - 6.5   Exercises: chapter_hashing/exercises.md - Chapter 7.   Trees: # [icon: material/graph-outline] - chapter_tree/index.md - 7.1   Binary trees: chapter_tree/binary_tree.md - 7.2   Traversing a binary tree: chapter_tree/binary_tree_traversal.md - 7.3   Array representation of a binary tree: chapter_tree/array_representation_of_tree.md - 7.4   Binary search trees: chapter_tree/binary_search_tree.md - 7.5   AVL trees *: chapter_tree/avl_tree.md - 7.6   Summary: chapter_tree/summary.md - 7.7   Exercises: chapter_tree/exercises.md - Chapter 8.   Heaps: # [icon: material/family-tree] - chapter_heap/index.md - 8.1   Heaps: chapter_heap/heap.md - 8.2   Building a heap: chapter_heap/build_heap.md - 8.3   The top-k problem: chapter_heap/top_k.md - 8.4   Summary: chapter_heap/summary.md - 8.5   Exercises: chapter_heap/exercises.md - Chapter 9.   Graphs: # [icon: material/graphql] - chapter_graph/index.md - 9.1   Graphs: chapter_graph/graph.md - 9.2   Basic graph operations: chapter_graph/graph_operations.md - 9.3   Graph traversal: chapter_graph/graph_traversal.md - 9.4   Summary: chapter_graph/summary.md - 9.5   Exercises: chapter_graph/exercises.md - Chapter 10.   Searching: # [icon: material/text-search] - chapter_searching/index.md - 10.1   Binary search: chapter_searching/binary_search.md - 10.2   Finding an insertion point with binary search: chapter_searching/binary_search_insertion.md - 10.3   Finding boundaries with binary search: chapter_searching/binary_search_edge.md - 10.4   Optimizing with hashing: chapter_searching/replace_linear_by_hashing.md - 10.5   Search algorithms revisited: chapter_searching/searching_algorithm_revisited.md - 10.6   Summary: chapter_searching/summary.md - 10.7   Exercises: chapter_searching/exercises.md - Chapter 11.   Sorting: # [icon: material/sort-ascending] - chapter_sorting/index.md - 11.1   Sorting algorithms: chapter_sorting/sorting_algorithm.md - 11.2   Selection sort: chapter_sorting/selection_sort.md - 11.3   Bubble sort: chapter_sorting/bubble_sort.md - 11.4   Insertion sort: chapter_sorting/insertion_sort.md - 11.5   Quick sort: chapter_sorting/quick_sort.md - 11.6   Merge sort: chapter_sorting/merge_sort.md - 11.7   Heap sort: chapter_sorting/heap_sort.md - 11.8   Bucket sort: chapter_sorting/bucket_sort.md - 11.9   Counting sort: chapter_sorting/counting_sort.md - 11.10   Radix sort: chapter_sorting/radix_sort.md - 11.11   Summary: chapter_sorting/summary.md - 11.12   Exercises: chapter_sorting/exercises.md - Chapter 12.   Divide and conquer: # [icon: material/set-split] - chapter_divide_and_conquer/index.md - 12.1   Divide and conquer: chapter_divide_and_conquer/divide_and_conquer.md - 12.2   Divide-and-conquer search: chapter_divide_and_conquer/binary_search_recur.md - 12.3   Building a binary tree: chapter_divide_and_conquer/build_binary_tree_problem.md - 12.4   Tower of Hanoi: chapter_divide_and_conquer/hanota_problem.md - 12.5   Summary: chapter_divide_and_conquer/summary.md - 12.6   Exercises: chapter_divide_and_conquer/exercises.md - Chapter 13.   Backtracking: # [icon: material/map-marker-path] - chapter_backtracking/index.md - 13.1   Backtracking algorithms: chapter_backtracking/backtracking_algorithm.md - 13.2   Permutations problem: chapter_backtracking/permutations_problem.md - 13.3   Subset sum problem: chapter_backtracking/subset_sum_problem.md - 13.4   N-queens problem: chapter_backtracking/n_queens_problem.md - 13.5   Summary: chapter_backtracking/summary.md - 13.6   Exercises: chapter_backtracking/exercises.md - Chapter 14.   Dynamic programming: # [icon: material/table-pivot] - chapter_dynamic_programming/index.md - 14.1   Introduction to dynamic programming: chapter_dynamic_programming/intro_to_dynamic_programming.md - 14.2   Properties of dynamic programming problems: chapter_dynamic_programming/dp_problem_features.md - 14.3   Solving dynamic programming problems: chapter_dynamic_programming/dp_solution_pipeline.md - 14.4   0-1 knapsack problem: chapter_dynamic_programming/knapsack_problem.md - 14.5   Unbounded knapsack problem: chapter_dynamic_programming/unbounded_knapsack_problem.md - 14.6   Edit distance problem: chapter_dynamic_programming/edit_distance_problem.md - 14.7   Summary: chapter_dynamic_programming/summary.md - 14.8   Exercises: chapter_dynamic_programming/exercises.md - Chapter 15.   Greedy algorithms: # [icon: material/head-heart-outline] - chapter_greedy/index.md - 15.1   Greedy algorithms: chapter_greedy/greedy_algorithm.md - 15.2   Fractional knapsack problem: chapter_greedy/fractional_knapsack_problem.md - 15.3   Maximum capacity problem: chapter_greedy/max_capacity_problem.md - 15.4   Maximum product cutting problem: chapter_greedy/max_product_cutting_problem.md - 15.5   Summary: chapter_greedy/summary.md - 15.6   Exercises: chapter_greedy/exercises.md - Chapter 16.   Appendix: # [icon: material/help-circle-outline] - chapter_appendix/index.md - 16.1   Setting up a programming environment: chapter_appendix/installation.md - 16.2   Contribute to the book: chapter_appendix/contribution.md - 16.3   Glossary: chapter_appendix/terminology.md - References: - chapter_reference/index.md