From 8b8168bb31cd09fb307eab6dac2a3755d3807670 Mon Sep 17 00:00:00 2001 From: krahets Date: Thu, 11 Apr 2024 20:03:16 +0800 Subject: [PATCH] build --- docs/index.html | 2 +- en/docs/chapter_data_structure/index.md | 2 +- en/docs/chapter_graph/index.md | 4 +- en/docs/chapter_heap/index.md | 4 +- en/docs/chapter_hello_algo/index.md | 30 ++ en/docs/chapter_introduction/index.md | 4 +- en/docs/chapter_tree/index.md | 10 +- en/docs/index.html | 367 ++++++++++++++++++++++++ en/docs/index.md | 151 +--------- overrides/main.html | 2 +- zh-Hant/docs/index.html | 2 +- 11 files changed, 414 insertions(+), 164 deletions(-) create mode 100644 en/docs/chapter_hello_algo/index.md create mode 100644 en/docs/index.html diff --git a/docs/index.html b/docs/index.html index c0e3ced64..9726d5b33 100644 --- a/docs/index.html +++ b/docs/index.html @@ -128,7 +128,7 @@ -

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

+

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

diff --git a/en/docs/chapter_data_structure/index.md b/en/docs/chapter_data_structure/index.md index 5b8f4bcce..58c2be9de 100644 --- a/en/docs/chapter_data_structure/index.md +++ b/en/docs/chapter_data_structure/index.md @@ -16,7 +16,7 @@ icon: material/shape-outline ## Chapter contents - [3.1   Classification of data structures](classification_of_data_structure.md) -- [3.2   Fundamental data types](basic_data_types.md) +- [3.2   Basic data types](basic_data_types.md) - [3.3   Number encoding *](number_encoding.md) - [3.4   Character encoding *](character_encoding.md) - [3.5   Summary](summary.md) diff --git a/en/docs/chapter_graph/index.md b/en/docs/chapter_graph/index.md index 79192e6f8..09a098784 100644 --- a/en/docs/chapter_graph/index.md +++ b/en/docs/chapter_graph/index.md @@ -16,6 +16,6 @@ icon: material/graphql ## Chapter contents - [9.1   Graph](graph.md) -- [9.2   Basic Graph Operations](graph_operations.md) -- [9.3   Graph Traversal](graph_traversal.md) +- [9.2   Basic graph operations](graph_operations.md) +- [9.3   Graph traversal](graph_traversal.md) - [9.4   Summary](summary.md) diff --git a/en/docs/chapter_heap/index.md b/en/docs/chapter_heap/index.md index b56500902..fb4c8c1f8 100644 --- a/en/docs/chapter_heap/index.md +++ b/en/docs/chapter_heap/index.md @@ -16,6 +16,6 @@ icon: material/family-tree ## Chapter contents - [8.1   Heap](heap.md) -- [8.2   Building a Heap](build_heap.md) -- [8.3   Top-k Problem](top_k.md) +- [8.2   Building a heap](build_heap.md) +- [8.3   Top-k problem](top_k.md) - [8.4   Summary](summary.md) diff --git a/en/docs/chapter_hello_algo/index.md b/en/docs/chapter_hello_algo/index.md new file mode 100644 index 000000000..fc65157df --- /dev/null +++ b/en/docs/chapter_hello_algo/index.md @@ -0,0 +1,30 @@ +--- +comments: true +icon: material/rocket-launch-outline +--- + +# Before starting + +A few years ago, I shared the "Sword for Offer" problem solutions on LeetCode, receiving encouragement and support from many readers. During interactions with readers, the most common question I encountered was "how to get started with algorithms." Gradually, I developed a keen interest in this question. + +Directly solving problems seems to be the most popular method — it's simple, direct, and effective. However, problem-solving is like playing a game of Minesweeper: those with strong self-study abilities can defuse the mines one by one, but those with insufficient basics might end up metaphorically bruised from explosions, retreating step by step in frustration. Going through textbooks is also common, but for those aiming for job applications, the energy spent on thesis writing, resume submissions, and preparation for written tests and interviews leaves little for tackling thick books, turning it into a daunting challenge. + +If you're facing similar troubles, then this book are lucky to have found you. This book is my answer to the question. While it may not be the best solution, it is at least a positive attempt. This book may not directly land you an offer, but it will guide you through the "knowledge map" in data structures and algorithms, help you understand the shapes, sizes, and locations of different "mines," and enable you to master various "demining methods." With these skills, I believe you can solve problems and read literature more comfortably, gradually building a knowledge system. + +I deeply agree with Professor Feynman's statement: "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 for this book, I will do my best, dedicating my utmost "attention" to this book. + +Knowing my limitations, although the content of this book has been refined over time, there are surely many errors remaining. I sincerely request critiques and corrections from all teachers and students. + +![Hello Algorithms](../assets/covers/chapter_hello_algo.jpg){ class="cover-image" } + +
+

Hello, Algo!

+
+ +The advent of computers has brought significant changes to the world. With their high-speed computing power and excellent programmability, they have become the ideal medium for executing algorithms and processing data. Whether it's the realistic graphics of video games, the intelligent decisions in autonomous driving, the brilliant Go games of AlphaGo, or the natural interactions of ChatGPT, these applications are all exquisite demonstrations of algorithms at work on computers. + +In fact, before the advent of computers, algorithms and data structures already existed in every corner of the world. Early algorithms were relatively simple, such as ancient counting methods and tool-making procedures. As civilization progressed, algorithms became more refined and complex. From the exquisite craftsmanship of artisans, to industrial products that liberate productive forces, to the scientific laws governing the universe, almost every ordinary or astonishing thing has behind it the ingenious thought of algorithms. + +Similarly, data structures are everywhere: from social networks to subway lines, many systems can be modeled as "graphs"; from a country to a family, the main forms of social organization exhibit characteristics of "trees"; winter clothes are like a "stack", where the first item worn is the last to be taken off; a badminton shuttle tube resembles a "queue", with one end for insertion and the other for retrieval; a dictionary is like a "hash table", enabling quick search for target entries. + +This book aims to help readers understand the core concepts of algorithms and data structures through clear, easy-to-understand animated illustrations and runnable code examples, and to be able to implement them through programming. On this basis, this book strives to reveal the vivid manifestations of algorithms in the complex world, showcasing the beauty of algorithms. I hope this book can help you! diff --git a/en/docs/chapter_introduction/index.md b/en/docs/chapter_introduction/index.md index 95325ba6b..3adc9a25e 100644 --- a/en/docs/chapter_introduction/index.md +++ b/en/docs/chapter_introduction/index.md @@ -3,9 +3,9 @@ comments: true icon: material/calculator-variant-outline --- -# Chapter 1.   Introduction to algorithms +# Chapter 1.   Encounter with algorithms -![Introduction to algorithms](../assets/covers/chapter_introduction.jpg){ class="cover-image" } +![Encounter with algorithms](../assets/covers/chapter_introduction.jpg){ class="cover-image" } !!! abstract diff --git a/en/docs/chapter_tree/index.md b/en/docs/chapter_tree/index.md index d796b5e3e..b121578e0 100644 --- a/en/docs/chapter_tree/index.md +++ b/en/docs/chapter_tree/index.md @@ -15,9 +15,9 @@ icon: material/graph-outline ## Chapter contents -- [7.1   Binary Tree](binary_tree.md) -- [7.2   Binary Tree Traversal](binary_tree_traversal.md) -- [7.3   Array Representation of Tree](array_representation_of_tree.md) -- [7.4   Binary Search Tree](binary_search_tree.md) -- [7.5   AVL Tree *](avl_tree.md) +- [7.1   Binary tree](binary_tree.md) +- [7.2   Binary tree Traversal](binary_tree_traversal.md) +- [7.3   Array Representation of tree](array_representation_of_tree.md) +- [7.4   Binary Search tree](binary_search_tree.md) +- [7.5   AVL tree *](avl_tree.md) - [7.6   Summary](summary.md) 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..402b9b2af 100644 --- a/en/docs/index.md +++ b/en/docs/index.md @@ -1,156 +1,9 @@ --- -comments: true +comments: false glightbox: false hide: - footer - toc - edit + - navigation --- - -
- -
- -

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
-
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 %} -

500 幅動畫圖解、12 種程式語言程式碼、3000 條社群問答,助你快速入門資料結構與演算法

+

500 幅動畫圖解、14 種程式語言程式碼、3000 條社群問答,助你快速入門資料結構與演算法