File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Contents/04.Queue/01.Queue-Basic Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
- 队列的插入操作又称为「入队」。
10
10
- 队列的删除操作又称为「出队」。
11
11
12
- ![ ] ( https://qcdn.itcharge.cn/images/20211204211538 .png )
12
+ ![ 队列结构 ] ( https://qcdn.itcharge.cn/images/202405092254785 .png )
13
13
14
14
简单来说,队列是一种 ** 「先进先出(First In First Out)」** 的线性表,简称为 ** 「FIFO 结构」** 。
15
15
56
56
57
57
#### 2.2.1 队列的顺序存储基本描述
58
58
59
- ![ ] ( https://qcdn.itcharge.cn/images/20211204211607 .png )
59
+ ![ 队列的顺序存储 ] ( https://qcdn.itcharge.cn/images/202405092254909 .png )
60
60
61
61
为了算法设计上的方便以及算法本身的简单,我们约定:队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。
62
62
@@ -176,7 +176,7 @@ def dequeue(self):
176
176
177
177
下面我们以「方式 3」中特意空出来一个位置的处理方式为例,对循环队列的顺序存储做一下基本描述。
178
178
179
- ![ ] ( https://qcdn.itcharge.cn/images/20220109164459 .png )
179
+ ![ 循环队列的顺序存储 ] ( https://qcdn.itcharge.cn/images/202405092254537 .png )
180
180
181
181
我们约定:$self.size$ 为循环队列的最大元素个数。队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。
182
182
@@ -253,7 +253,7 @@ class Queue:
253
253
254
254
#### 2.3.1 队列的链式存储基本描述
255
255
256
- ![ ] ( https://qcdn.itcharge.cn/images/20211204211644 .png )
256
+ ![ 队列的链式存储 ] ( https://qcdn.itcharge.cn/images/202405092255125 .png )
257
257
258
258
我们约定:队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。
259
259
You can’t perform that action at this time.
0 commit comments