From 3fdebdd4b20920905eaf55e3c8f1a9c4c749e34f Mon Sep 17 00:00:00 2001 From: krahets Date: Mon, 4 Mar 2024 15:31:11 +0800 Subject: [PATCH] build --- docs-en/chapter_preface/about_the_book.md | 2 +- docs-en/chapter_stack_and_queue/deque.md | 20 ++++++++++---------- docs-en/chapter_stack_and_queue/queue.md | 12 ++++++------ docs-en/chapter_stack_and_queue/stack.md | 12 ++++++------ 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs-en/chapter_preface/about_the_book.md b/docs-en/chapter_preface/about_the_book.md index 18d92d7c3..7b94c3955 100644 --- a/docs-en/chapter_preface/about_the_book.md +++ b/docs-en/chapter_preface/about_the_book.md @@ -30,7 +30,7 @@ The main content of the book is shown in the following figure. - **Data Structures**: focuses on fundamental data types, classification methods, definitions, pros and cons, common operations, types, applications, and implementation methods of data structures such as array, linked list, stack, queue, hash table, tree, heap, graph, etc. - **Algorithms**: defines algorithms, discusses their pros and cons, efficiency, application scenarios, problem-solving steps, and includes sample questions for various algorithms such as search, sorting, divide and conquer, backtracking, dynamic programming, greedy algorithms, and more. -![Main Content of the Book](about_the_book.assets/hello_algo_mindmap.jpg){ class="animation-figure" } +![Main Content of the Book](about_the_book.assets/hello_algo_mindmap.png){ class="animation-figure" }

Figure 0-1   Main Content of the Book

diff --git a/docs-en/chapter_stack_and_queue/deque.md b/docs-en/chapter_stack_and_queue/deque.md index 3129f7f17..5b08f7ce3 100644 --- a/docs-en/chapter_stack_and_queue/deque.md +++ b/docs-en/chapter_stack_and_queue/deque.md @@ -358,19 +358,19 @@ For a double-ended queue, both the head and the tail can perform enqueue and deq As shown in the Figure 5-8 , we treat the head and tail nodes of the doubly linked list as the front and rear of the double-ended queue, respectively, and implement the functionality to add and remove nodes at both ends. === "LinkedListDeque" - ![Implementing Double-Ended Queue with Doubly Linked List for Enqueue and Dequeue Operations](deque.assets/linkedlist_deque.png){ class="animation-figure" } + ![Implementing Double-Ended Queue with Doubly Linked List for Enqueue and Dequeue Operations](deque.assets/linkedlist_deque_step1.png){ class="animation-figure" } === "pushLast()" - ![linkedlist_deque_push_last](deque.assets/linkedlist_deque_push_last.png){ class="animation-figure" } + ![linkedlist_deque_push_last](deque.assets/linkedlist_deque_step2_push_last.png){ class="animation-figure" } === "pushFirst()" - ![linkedlist_deque_push_first](deque.assets/linkedlist_deque_push_first.png){ class="animation-figure" } + ![linkedlist_deque_push_first](deque.assets/linkedlist_deque_step3_push_first.png){ class="animation-figure" } === "popLast()" - ![linkedlist_deque_pop_last](deque.assets/linkedlist_deque_pop_last.png){ class="animation-figure" } + ![linkedlist_deque_pop_last](deque.assets/linkedlist_deque_step4_pop_last.png){ class="animation-figure" } === "popFirst()" - ![linkedlist_deque_pop_first](deque.assets/linkedlist_deque_pop_first.png){ class="animation-figure" } + ![linkedlist_deque_pop_first](deque.assets/linkedlist_deque_step5_pop_first.png){ class="animation-figure" }

Figure 5-8   Implementing Double-Ended Queue with Doubly Linked List for Enqueue and Dequeue Operations

@@ -1996,19 +1996,19 @@ The implementation code is as follows: As shown in the Figure 5-9 , similar to implementing a queue with an array, we can also use a circular array to implement a double-ended queue. === "ArrayDeque" - ![Implementing Double-Ended Queue with Array for Enqueue and Dequeue Operations](deque.assets/array_deque.png){ class="animation-figure" } + ![Implementing Double-Ended Queue with Array for Enqueue and Dequeue Operations](deque.assets/array_deque_step1.png){ class="animation-figure" } === "pushLast()" - ![array_deque_push_last](deque.assets/array_deque_push_last.png){ class="animation-figure" } + ![array_deque_push_last](deque.assets/array_deque_step2_push_last.png){ class="animation-figure" } === "pushFirst()" - ![array_deque_push_first](deque.assets/array_deque_push_first.png){ class="animation-figure" } + ![array_deque_push_first](deque.assets/array_deque_step3_push_first.png){ class="animation-figure" } === "popLast()" - ![array_deque_pop_last](deque.assets/array_deque_pop_last.png){ class="animation-figure" } + ![array_deque_pop_last](deque.assets/array_deque_step4_pop_last.png){ class="animation-figure" } === "popFirst()" - ![array_deque_pop_first](deque.assets/array_deque_pop_first.png){ class="animation-figure" } + ![array_deque_pop_first](deque.assets/array_deque_step5_pop_first.png){ class="animation-figure" }

Figure 5-9   Implementing Double-Ended Queue with Array for Enqueue and Dequeue Operations

diff --git a/docs-en/chapter_stack_and_queue/queue.md b/docs-en/chapter_stack_and_queue/queue.md index 514908285..c306a7f88 100755 --- a/docs-en/chapter_stack_and_queue/queue.md +++ b/docs-en/chapter_stack_and_queue/queue.md @@ -332,13 +332,13 @@ To implement a queue, we need a data structure that allows adding elements at on As shown in the Figure 5-5 , we can consider the "head node" and "tail node" of a linked list as the "head" and "tail" of the queue, respectively. We restrict the operations so that nodes can only be added at the tail and removed at the head. === "LinkedListQueue" - ![Implementing Queue with Linked List for Enqueue and Dequeue Operations](queue.assets/linkedlist_queue.png){ class="animation-figure" } + ![Implementing Queue with Linked List for Enqueue and Dequeue Operations](queue.assets/linkedlist_queue_step1.png){ class="animation-figure" } === "push()" - ![linkedlist_queue_push](queue.assets/linkedlist_queue_push.png){ class="animation-figure" } + ![linkedlist_queue_push](queue.assets/linkedlist_queue_step2_push.png){ class="animation-figure" } === "pop()" - ![linkedlist_queue_pop](queue.assets/linkedlist_queue_pop.png){ class="animation-figure" } + ![linkedlist_queue_pop](queue.assets/linkedlist_queue_step3_pop.png){ class="animation-figure" }

Figure 5-5   Implementing Queue with Linked List for Enqueue and Dequeue Operations

@@ -1231,13 +1231,13 @@ With this design, **the effective interval of elements in the array is `[front, Both enqueue and dequeue operations only require a single operation, each with a time complexity of $O(1)$. === "ArrayQueue" - ![Implementing Queue with Array for Enqueue and Dequeue Operations](queue.assets/array_queue.png){ class="animation-figure" } + ![Implementing Queue with Array for Enqueue and Dequeue Operations](queue.assets/array_queue_step1.png){ class="animation-figure" } === "push()" - ![array_queue_push](queue.assets/array_queue_push.png){ class="animation-figure" } + ![array_queue_push](queue.assets/array_queue_step2_push.png){ class="animation-figure" } === "pop()" - ![array_queue_pop](queue.assets/array_queue_pop.png){ class="animation-figure" } + ![array_queue_pop](queue.assets/array_queue_step3_pop.png){ class="animation-figure" }

Figure 5-6   Implementing Queue with Array for Enqueue and Dequeue Operations

diff --git a/docs-en/chapter_stack_and_queue/stack.md b/docs-en/chapter_stack_and_queue/stack.md index 9e390d536..db5fa9079 100755 --- a/docs-en/chapter_stack_and_queue/stack.md +++ b/docs-en/chapter_stack_and_queue/stack.md @@ -330,13 +330,13 @@ When implementing a stack using a linked list, we can consider the head node of As shown in the Figure 5-2 , for the push operation, we simply insert elements at the head of the linked list. This method of node insertion is known as "head insertion." For the pop operation, we just need to remove the head node from the list. === "LinkedListStack" - ![Implementing Stack with Linked List for Push and Pop Operations](stack.assets/linkedlist_stack.png){ class="animation-figure" } + ![Implementing Stack with Linked List for Push and Pop Operations](stack.assets/linkedlist_stack_step1.png){ class="animation-figure" } === "push()" - ![linkedlist_stack_push](stack.assets/linkedlist_stack_push.png){ class="animation-figure" } + ![linkedlist_stack_push](stack.assets/linkedlist_stack_step2_push.png){ class="animation-figure" } === "pop()" - ![linkedlist_stack_pop](stack.assets/linkedlist_stack_pop.png){ class="animation-figure" } + ![linkedlist_stack_pop](stack.assets/linkedlist_stack_step3_pop.png){ class="animation-figure" }

Figure 5-2   Implementing Stack with Linked List for Push and Pop Operations

@@ -1094,13 +1094,13 @@ Below is an example code for implementing a stack based on a linked list: When implementing a stack using an array, we can consider the end of the array as the top of the stack. As shown in the Figure 5-3 , push and pop operations correspond to adding and removing elements at the end of the array, respectively, both with a time complexity of $O(1)$. === "ArrayStack" - ![Implementing Stack with Array for Push and Pop Operations](stack.assets/array_stack.png){ class="animation-figure" } + ![Implementing Stack with Array for Push and Pop Operations](stack.assets/array_stack_step1.png){ class="animation-figure" } === "push()" - ![array_stack_push](stack.assets/array_stack_push.png){ class="animation-figure" } + ![array_stack_push](stack.assets/array_stack_step2_push.png){ class="animation-figure" } === "pop()" - ![array_stack_pop](stack.assets/array_stack_pop.png){ class="animation-figure" } + ![array_stack_pop](stack.assets/array_stack_step3_pop.png){ class="animation-figure" }

Figure 5-3   Implementing Stack with Array for Push and Pop Operations