Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[pull] main from itcharge:main #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
pull merged 6 commits into AlgorithmAndLeetCode:main from itcharge:main
May 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 01.Queue-Basic.md
  • Loading branch information
itcharge committed May 9, 2024
commit fcab6b9dba1bf8079eeea99b8a2939b748672a8c
8 changes: 4 additions & 4 deletions Contents/04.Queue/01.Queue-Basic/01.Queue-Basic.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- 队列的插入操作又称为「入队」。
- 队列的删除操作又称为「出队」。

![](https://qcdn.itcharge.cn/images/20211204211538.png)
![队列结构](https://qcdn.itcharge.cn/images/202405092254785.png)

简单来说,队列是一种 **「先进先出(First In First Out)」** 的线性表,简称为 **「FIFO 结构」**。

Expand Down Expand Up @@ -56,7 +56,7 @@

#### 2.2.1 队列的顺序存储基本描述

![](https://qcdn.itcharge.cn/images/20211204211607.png)
![队列的顺序存储](https://qcdn.itcharge.cn/images/202405092254909.png)

为了算法设计上的方便以及算法本身的简单,我们约定:队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。

Expand Down Expand Up @@ -176,7 +176,7 @@ def dequeue(self):

下面我们以「方式 3」中特意空出来一个位置的处理方式为例,对循环队列的顺序存储做一下基本描述。

![](https://qcdn.itcharge.cn/images/20220109164459.png)
![循环队列的顺序存储](https://qcdn.itcharge.cn/images/202405092254537.png)

我们约定:$self.size$ 为循环队列的最大元素个数。队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。

Expand Down Expand Up @@ -253,7 +253,7 @@ class Queue:

#### 2.3.1 队列的链式存储基本描述

![](https://qcdn.itcharge.cn/images/20211204211644.png)
![队列的链式存储](https://qcdn.itcharge.cn/images/202405092255125.png)

我们约定:队头指针 $self.front$ 指向队头元素所在位置的前一个位置,而队尾指针 $self.rear$ 指向队尾元素所在位置。

Expand Down

AltStyle によって変換されたページ (->オリジナル) /