diff --git a/Dockerfile b/Dockerfile index 89e35a391..7531d6f91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,23 @@ FROM python:3.10.0-alpine ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install --upgrade pip -RUN pip install mkdocs-material==9.5.2 mkdocs-glightbox +RUN pip install mkdocs-material==9.5.5 mkdocs-glightbox WORKDIR /hello-algo COPY overrides ./build/overrides -COPY docs ./build/docs -COPY docs-en ./build/docs-en -COPY mkdocs.yml ./mkdocs.yml -COPY mkdocs-en.yml ./mkdocs-en.yml +COPY docs ./build/docs +COPY mkdocs.yml mkdocs.yml RUN mkdocs build -f mkdocs.yml -RUN mkdocs build -f mkdocs-en.yml + +COPY zh-hant/docs ./build/zh-hant/docs +COPY zh-hant/mkdocs.yml ./zh-hant/mkdocs.yml +RUN mkdocs build -f ./zh-hant/mkdocs.yml + +COPY en/docs ./build/en/docs +COPY en/mkdocs.yml ./en/mkdocs.yml +RUN mkdocs build -f ./en/mkdocs.yml WORKDIR /hello-algo/site EXPOSE 8000 diff --git a/docs/assets/avatar/avatar_curtishd.jpg b/docs/assets/avatar/avatar_curtishd.jpg new file mode 100644 index 000000000..40d47610b Binary files /dev/null and b/docs/assets/avatar/avatar_curtishd.jpg differ diff --git a/docs/index.html b/docs/index.html index 53aa17fcf..9726d5b33 100644 --- a/docs/index.html +++ b/docs/index.html @@ -111,22 +111,24 @@
- Preview + Preview
- - - - - - - - - - - - + + + + + + + + + + + + + +
-

500 幅动画图解、12 种编程语言代码、3000 条社区问答,助你快速入门数据结构与算法

+

500 幅动画图解、14 种编程语言代码、3000 条社区问答,助你快速入门数据结构与算法

@@ -284,6 +286,14 @@
Zig, Rust +
+ + Reviewer: curtishd +
curtishd +
Kotlin +
+
Reviewer: Gonglja @@ -347,7 +357,7 @@

贡献者

-

本书在开源社区 140 多位贡献者的共同努力下不断完善,感谢他们付出的时间与精力!

+

本书在开源社区一百多位贡献者的共同努力下不断完善,感谢他们付出的时间与精力!

Contributors diff --git a/docs/index.md b/docs/index.md index 402b9b2af..14fa0271f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,5 @@ ---- -comments: false -glightbox: false -hide: - - footer - - toc - - edit - - navigation ---- +# Hello 算法 + +动画图解、一键运行的数据结构与算法教程 + +[开始阅读](chapter_hello_algo/) diff --git a/en/README.md b/en/README.md index 342255564..fb59c81af 100644 --- a/en/README.md +++ b/en/README.md @@ -6,7 +6,7 @@

hello-algo-typing-svg
- Data Structures and Algorithms Crash Course with Animated Illustrations and Off-the-Shelf Code + Data structures and algorithms crash course with animated illustrations and off-the-shelf code

@@ -57,13 +57,13 @@ If you find this book helpful, please give it a Star :star: to support us, thank > "An easy-to-understand book on data structures and algorithms, which guides readers to learn by minds-on and hands-on. Strongly recommended for algorithm beginners!" > -> **—— Junhui Deng, Professor of Computer Science, Tsinghua University** +> **—— Junhui Deng, Professor, Department of computer science and technology, Tsinghua University** > "If I had 'Hello Algo' when I was learning data structures and algorithms, it would have been 10 times easier!" > > **—— Mu Li, Senior Principal Scientist, Amazon** -## Contribution +## Contributing > [!Important] > diff --git a/en/docs/index.html b/en/docs/index.html new file mode 100644 index 000000000..9e72ce177 --- /dev/null +++ b/en/docs/index.html @@ -0,0 +1,367 @@ + +

+ + + + + +
+ +
+

+ Data structures and algorithms crash course with animated illustrations and off-the-shelf code +

+ + + + + Dive in + + + + + + + GitHub + +
+ +
+ + + +
+
+
+ + +
+
+ Preview +
+ + + + + + + + + + + + + + +
+

500 animated illustrations, 14 programming languages, and 3000 community Q&As to help you quickly get started with data structures and algorithms

+
+
+ + +
+ +
+ + +
+
+

Endorsements

+
+
+

“An easy-to-understand book on data structures and algorithms, which guides readers to learn by minds-on and hands-on. Strongly recommended for algorithm beginners!”

+

—— Junhui Deng, Professor, Department of computer science and technology, Tsinghua University

+
+
+

“If I had 'Hello Algo' when I was learning data structures and algorithms, it would have been 10 times easier!”

+

—— Mu Li, Senior principal scientist, Amazon

+
+
+
+
+ + +
+
+
+
+
+
+ + + +

Animated illustrations

+
+

It's crafted for ease of understanding, ensuring a smooth learning journey.

+

"A picture is worth a thousand words."

+
+
+ Animation example +
+ +
+ Running code example +
+
+
+ + + +

Off-the-shelf code

+
+

Featuring multiple programming languages, all runnable with a single click.

+

"Talk is cheap. Show me the code."

+
+
+
+ +
+
+
+
+ + + +

Learning together

+
+

Welcome discussions and questions with open arms.

+

"Learning by teaching."

+
+
+ Comments example +
+ +
+
+ + +
+
+ +
+

Author

+ +
+ + +
+

Code reviewers

+ +
+ + +
+

Contributors

+

This book has been enhanced through the collaborative efforts of more than 100 contributors. Thanks for their invaluable time and input!

+ + Contributors + +
+
+
\ No newline at end of file diff --git a/en/docs/index.md b/en/docs/index.md index d1195ac22..59eb61d7a 100644 --- a/en/docs/index.md +++ b/en/docs/index.md @@ -1,156 +1,5 @@ ---- -comments: true -glightbox: false -hide: - - footer - - toc - - edit ---- +# Hello Algo -
- -
+Data structures and algorithms crash course with animated illustrations and off-the-shelf code -

Hello Algo

- -

Data Structures and Algorithms Crash Course with Animated Illustrations and Off-the-Shelf Code

- -

- - GitHub repo stars - -   - - GitHub all releases - -   - - GitHub contributors - -

- -

- - - Dive In - - - - Clone Repo - - - - Get PDF - -

- -
-

The English version is brewing...

-

Feel free to engage in Chinese-to-English translation and pull request review! For guidelines, please see #914.

-
- -
-
-

Quote

-

"An easy-to-understand book on data structures and algorithms, which guides readers to learn by minds-on and hands-on. Strongly recommended for algorithm beginners!"

-

—— Junhui Deng, Professor of Computer Science, Tsinghua University

-
-
-

Quote

-

"If I had 'Hello Algo' when I was learning data structures and algorithms, it would have been 10 times easier!"

-

—— Mu Li, Senior Principal Scientist, Amazon

-
-
- ---- - -
-
-
-

Animated illustrations

- -
-

Easy to understand
Smooth learning curve

-
- -
- -
-

"A picture is worth a thousand words."

-
- -
- -
-
-

Off-the-Shelf Code

- -
-

Multi programming languages
Run with one click

-
-
- -
-

"Talk is cheap. Show me the code."

-
- -
-
-
-

Learning Together

- -
-

Discussion and questions welcome
Readers progress together

-
- -
- -
-

"Learning by teaching."

-
- ---- - -

Preface

- -Two years ago, I shared the "Sword Offer" series of problem solutions on LeetCode, which received much love and support from many students. During my interactions with readers, the most common question I encountered was "How to get started with algorithms." Gradually, I developed a deep interest in this question. - -Blindly solving problems seems to be the most popular method, being simple, direct, and effective. However, problem-solving is like playing a "Minesweeper" game, where students with strong self-learning abilities can successfully clear the mines one by one, but those with insufficient foundations may end up bruised from explosions, retreating step by step in frustration. Thoroughly reading textbooks is also common, but for students aiming for job applications, the energy consumed by graduation, resume submissions, and preparing for written tests and interviews makes tackling thick books a daunting challenge. - -If you are facing similar troubles, then you are lucky to have found this book. This book is my answer to this question, not necessarily the best solution, but at least an active attempt. Although this book won't directly land you an Offer, it will guide you through the "knowledge map" of data structures and algorithms, help you understand the shape, size, and distribution of different "mines," and equip you with various "demining methods." With these skills, I believe you can more comfortably solve problems and read literature, gradually building a complete knowledge system. - -I deeply agree with Professor Feynman's saying: "Knowledge isn't free. You have to pay attention." In this sense, this book is not entirely "free." To not disappoint the precious "attention" you pay to this book, I will do my utmost, investing the greatest "attention" to complete the creation of this book. - -

Author

- -Yudong Jin([krahets](https://leetcode.cn/u/jyd/)), Senior Algorithm Engineer in a top tech company, Master's degree from Shanghai Jiao Tong University. The highest-read blogger across the entire LeetCode, his published ["Illustration of Algorithm Data Structures"](https://leetcode.cn/leetbook/detail/illustration-of-algorithm/) has been subscribed to by over 300k. - ---- - -

Contribution

- -This book is continuously improved with the joint efforts of many contributors from the open-source community. Thanks to each writer who invested their time and energy, listed in the order generated by GitHub: - -

- - - -

- -The code review work for this book was completed by codingonion, Gonglja, gvenusleo, hpstory, justin‐tse, krahets, night-cruise, nuomi1, and Reanon (listed in alphabetical order). Thanks to them for their time and effort, ensuring the standardization and uniformity of the code in various languages. - -
- - - - - - - - - - - - -
codingonion
codingonion

Rust, Zig
Gonglja
Gonglja

C, C++
gvenusleo
gvenusleo

Dart
hpstory
hpstory

C#
justin-tse
justin-tse

JS, TS
krahets
krahets

Java, Python
night-cruise
night-cruise

Rust
nuomi1
nuomi1

Swift
Reanon
Reanon

Go, C
-
+[Dive in](chapter_hello_algo/) diff --git a/en/mkdocs.yml b/en/mkdocs.yml index c5603bbec..03a645e2d 100644 --- a/en/mkdocs.yml +++ b/en/mkdocs.yml @@ -64,7 +64,7 @@ nav: # [icon: material/shape-outline] - chapter_data_structure/index.md - 3.1 Classification of data structures: chapter_data_structure/classification_of_data_structure.md - - 3.2 Fundamental data types: chapter_data_structure/basic_data_types.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 @@ -93,25 +93,25 @@ nav: - Chapter 7. Tree: # [icon: material/graph-outline] - chapter_tree/index.md - - 7.1 Binary Tree: chapter_tree/binary_tree.md - - 7.2 Binary Tree Traversal: chapter_tree/binary_tree_traversal.md - - 7.3 Array Representation of Tree: chapter_tree/array_representation_of_tree.md - - 7.4 Binary Search Tree: chapter_tree/binary_search_tree.md - - 7.5 AVL Tree *: chapter_tree/avl_tree.md + - 7.1 Binary tree: chapter_tree/binary_tree.md + - 7.2 Binary tree Traversal: chapter_tree/binary_tree_traversal.md + - 7.3 Array Representation of tree: chapter_tree/array_representation_of_tree.md + - 7.4 Binary Search tree: chapter_tree/binary_search_tree.md + - 7.5 AVL tree *: chapter_tree/avl_tree.md - 7.6 Summary: chapter_tree/summary.md - Chapter 8. Heap: # [icon: material/family-tree] - chapter_heap/index.md - 8.1 Heap: chapter_heap/heap.md - - 8.2 Building a Heap: chapter_heap/build_heap.md - - 8.3 Top-k Problem: chapter_heap/top_k.md + - 8.2 Building a heap: chapter_heap/build_heap.md + - 8.3 Top-k problem: chapter_heap/top_k.md - 8.4 Summary: chapter_heap/summary.md - Chapter 9. Graph: # [icon: material/graphql] - chapter_graph/index.md - 9.1 Graph: chapter_graph/graph.md - - 9.2 Basic Graph Operations: chapter_graph/graph_operations.md - - 9.3 Graph Traversal: chapter_graph/graph_traversal.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 # - Chapter 10. Searching: # # [icon: material/text-search] diff --git a/overrides/main.html b/overrides/main.html index 4e2c3a831..34d38843e 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -6,7 +6,7 @@ {% elif config.theme.language == 'zh-Hant' %} {% set announcements = '紙質書(簡體中文版)已發行,詳情請見這裡' %} {% elif config.theme.language == 'en' %} - {% set announcements = 'The paper book (Chinese version) published. Please visit this link for more details.' %} + {% set announcements = 'Feel free to engage in Chinese-to-English translation and pull request review! Please visit #914 for details.' %} {% endif %}