diff --git a/README.md b/README.md index 55d8b35a3..248e4321c 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@

- + - + - +

diff --git a/codes/c/chapter_array_and_linkedlist/linked_list.c b/codes/c/chapter_array_and_linkedlist/linked_list.c index 5110d46ae..d8275bcce 100644 --- a/codes/c/chapter_array_and_linkedlist/linked_list.c +++ b/codes/c/chapter_array_and_linkedlist/linked_list.c @@ -28,9 +28,10 @@ void removeItem(ListNode *n0) { /* 访问链表中索引为 index 的节点 */ ListNode *access(ListNode *head, int index) { - while (head && head->next && index) { + for (int i = 0; i < index; i++) { + if (head == NULL) + return NULL; head = head->next; - index--; } return head; } diff --git a/docs-en/chapter_preface/about_the_book.md b/docs-en/chapter_preface/about_the_book.md index 3a0dca00d..2e2f8574b 100644 --- a/docs-en/chapter_preface/about_the_book.md +++ b/docs-en/chapter_preface/about_the_book.md @@ -40,6 +40,6 @@ During the creation of this book, I received help from many people, including bu During the writing process, I read many textbooks and articles on data structures and algorithms. These works provide excellent models for this book and ensure the accuracy and quality of its contents. I would like to thank all my teachers and predecessors for their outstanding contributions! -This book promotes a hands-on approach to learning, and in this respect is heavily inspired by ["Hands-On Learning for Depth"](https://github.com/d2l-ai/d2l-zh). I highly recommend this excellent book to all readers. +This book promotes a hands-on approach to learning, and in this respect is heavily inspired by ["Dive into Deep Learning"](https://github.com/d2l-ai/d2l-zh). I highly recommend this excellent book to you. -A heartfelt thank you to my parents, it is your constant support and encouragement that gives me the opportunity to do this fun-filled thing. +**A heartfelt thank you to my parents, it is your constant support and encouragement that gives me the opportunity to do this fun-filled thing**. diff --git a/docs-en/index.assets/animation.gif b/docs-en/index.assets/animation.gif index c38f2ed40..641e677ef 100644 Binary files a/docs-en/index.assets/animation.gif and b/docs-en/index.assets/animation.gif differ diff --git a/docs-en/index.assets/animation_dark.gif b/docs-en/index.assets/animation_dark.gif new file mode 100644 index 000000000..a05aedd70 Binary files /dev/null and b/docs-en/index.assets/animation_dark.gif differ diff --git a/docs-en/index.assets/btn_chinese_edition.svg b/docs-en/index.assets/btn_chinese_edition.svg index f8a4b21d7..1d43e5738 100644 --- a/docs-en/index.assets/btn_chinese_edition.svg +++ b/docs-en/index.assets/btn_chinese_edition.svg @@ -1 +1 @@ -中文版 \ No newline at end of file +中文版 \ No newline at end of file diff --git a/docs-en/index.assets/btn_chinese_edition_dark.svg b/docs-en/index.assets/btn_chinese_edition_dark.svg index e96c12f38..e622663ba 100644 --- a/docs-en/index.assets/btn_chinese_edition_dark.svg +++ b/docs-en/index.assets/btn_chinese_edition_dark.svg @@ -1 +1 @@ -中文版 \ No newline at end of file +中文版 \ No newline at end of file diff --git a/docs-en/index.assets/btn_download_pdf.svg b/docs-en/index.assets/btn_download_pdf.svg index e486da953..ed236a077 100644 --- a/docs-en/index.assets/btn_download_pdf.svg +++ b/docs-en/index.assets/btn_download_pdf.svg @@ -1 +1 @@ -PDF \ No newline at end of file +PDF \ No newline at end of file diff --git a/docs-en/index.assets/btn_download_pdf_dark.svg b/docs-en/index.assets/btn_download_pdf_dark.svg index 99266fde5..308cfeda0 100644 --- a/docs-en/index.assets/btn_download_pdf_dark.svg +++ b/docs-en/index.assets/btn_download_pdf_dark.svg @@ -1 +1 @@ -PDF \ No newline at end of file +PDF \ No newline at end of file diff --git a/docs-en/index.assets/btn_read_online.svg b/docs-en/index.assets/btn_read_online.svg index ba1d2c684..a2500e44f 100644 --- a/docs-en/index.assets/btn_read_online.svg +++ b/docs-en/index.assets/btn_read_online.svg @@ -1 +1 @@ -Web \ No newline at end of file +Web \ No newline at end of file diff --git a/docs-en/index.assets/btn_read_online_dark.svg b/docs-en/index.assets/btn_read_online_dark.svg index debaba56c..ddf3a6b2e 100644 --- a/docs-en/index.assets/btn_read_online_dark.svg +++ b/docs-en/index.assets/btn_read_online_dark.svg @@ -1 +1 @@ -Web \ No newline at end of file +Web \ No newline at end of file diff --git a/docs-en/index.assets/comment.gif b/docs-en/index.assets/comment.gif index 7e69eefc4..a6c5b8444 100644 Binary files a/docs-en/index.assets/comment.gif and b/docs-en/index.assets/comment.gif differ diff --git a/docs-en/index.assets/running_code.gif b/docs-en/index.assets/running_code.gif index 50c57feb8..5c77187f7 100644 Binary files a/docs-en/index.assets/running_code.gif and b/docs-en/index.assets/running_code.gif differ diff --git a/docs-en/index.assets/running_code_dark.gif b/docs-en/index.assets/running_code_dark.gif new file mode 100644 index 000000000..5d56a0184 Binary files /dev/null and b/docs-en/index.assets/running_code_dark.gif differ diff --git a/docs-en/index.md b/docs-en/index.md index 305ff4c89..68593a68e 100644 --- a/docs-en/index.md +++ b/docs-en/index.md @@ -61,6 +61,11 @@ hide:

+
+

The English edition is brewing...

+

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

+
+ ---

Endorsements

diff --git a/docs/index.assets/btn_download_pdf.svg b/docs/index.assets/btn_download_pdf.svg index 1f5b47963..e77fe0312 100644 --- a/docs/index.assets/btn_download_pdf.svg +++ b/docs/index.assets/btn_download_pdf.svg @@ -1 +1 @@ -下载PDF \ No newline at end of file +下载PDF \ No newline at end of file diff --git a/docs/index.assets/btn_download_pdf_dark.svg b/docs/index.assets/btn_download_pdf_dark.svg index f24cc1f99..039e36688 100644 --- a/docs/index.assets/btn_download_pdf_dark.svg +++ b/docs/index.assets/btn_download_pdf_dark.svg @@ -1 +1 @@ -下载PDF \ No newline at end of file +下载PDF \ No newline at end of file diff --git a/docs/index.assets/btn_english_edition.svg b/docs/index.assets/btn_english_edition.svg index 4bf9f5d3b..9ca2a67e8 100644 --- a/docs/index.assets/btn_english_edition.svg +++ b/docs/index.assets/btn_english_edition.svg @@ -1 +1 @@ -English Ed. \ No newline at end of file +English Ed. \ No newline at end of file diff --git a/docs/index.assets/btn_english_edition_dark.svg b/docs/index.assets/btn_english_edition_dark.svg index aea14a45b..cff7a80ca 100644 --- a/docs/index.assets/btn_english_edition_dark.svg +++ b/docs/index.assets/btn_english_edition_dark.svg @@ -1 +1 @@ -English Ed. \ No newline at end of file +English Ed. \ No newline at end of file diff --git a/docs/index.assets/btn_read_online.svg b/docs/index.assets/btn_read_online.svg index 354221143..aacbc6577 100644 --- a/docs/index.assets/btn_read_online.svg +++ b/docs/index.assets/btn_read_online.svg @@ -1 +1 @@ -在线阅读 \ No newline at end of file +在线阅读 \ No newline at end of file diff --git a/docs/index.assets/btn_read_online_dark.svg b/docs/index.assets/btn_read_online_dark.svg index b5aef7e2b..96a6c9133 100644 --- a/docs/index.assets/btn_read_online_dark.svg +++ b/docs/index.assets/btn_read_online_dark.svg @@ -1 +1 @@ -在线阅读 \ No newline at end of file +在线阅读 \ No newline at end of file diff --git a/mkdocs-en.yml b/mkdocs-en.yml index 1dc3d6f54..a2b42298c 100644 --- a/mkdocs-en.yml +++ b/mkdocs-en.yml @@ -34,9 +34,9 @@ nav: # [icon: material/calculator-variant-outline] - chapter_introduction/index.md - 1.1 Algorithms Are Everywhere: chapter_introduction/algorithms_are_everywhere.md - - 1.2 What is Algorithms: chapter_introduction/what_is_dsa.md + - 1.2 What Is Algorithms: chapter_introduction/what_is_dsa.md - 1.3 Summary: chapter_introduction/summary.md - - Chapter 2. Computational Complexity: + - Chapter 2. Complexity Analysis: # [icon: material/timer-sand] - chapter_computational_complexity/index.md - 2.1 Evaluating Algorithm Efficiency: chapter_computational_complexity/performance_evaluation.md