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 @@ - \ No newline at end of file + \ 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 @@ - \ No newline at end of file + \ 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 @@ - \ No newline at end of file + \ 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 @@ - \ No newline at end of file + \ 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.
+