Skip to content

Commit

Permalink
Merge pull request #137 from YiluSu/patch-1
Browse files Browse the repository at this point in the history
Update typo in 01.Priority-Queue.md
  • Loading branch information
itcharge committed May 6, 2024
2 parents 4f9fbe1 + 8faecc9 commit 14a4b28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Contents/04.Queue/02.Priority-Queue/01.Priority-Queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

### 4.2 二叉堆的基本操作

二叉树主要涉及两个基本操作:「堆调整方法」和「将数组构建为二叉堆方法」。
二叉堆主要涉及两个基本操作:「堆调整方法」和「将数组构建为二叉堆方法」。

- **堆调整方法 `heapAdjust`**:把移走了最大值元素以后的剩余元素组成的序列再构造为一个新的堆积。具体步骤如下:
- 从根节点开始,自上而下地调整节点的位置,使其成为堆积。即把序号为 $i$ 的节点与其左子树节点(序号为 $2 \times i$)、右子树节点(序号为 $2 \times i + 1$)中值最大的节点交换位置。
Expand Down Expand Up @@ -399,4 +399,4 @@ class Solution:
- 【博文】[Python3,手写一个堆及其简易功能,并实现优先队列,最小堆任务调度等 - pythonstrat 的博客](https://blog.csdn.net/pythonstrat/article/details/119378788)
- 【文档】[实现一个优先级队列 - python3-cookbook 3.0.0 文档](https://python3-cookbook.readthedocs.io/zh_CN/latest/c01/p05_implement_a_priority_queue.html)
- 【文档】[heapq - 堆队列算法 - Python 3.10.1 文档](https://docs.python.org/zh-cn/3/library/heapq.html)
- 【题解】[239. 滑动窗口最大值 (优先队列&单调栈) - 滑动窗口最大值 - 力扣](https://leetcode.cn/problems/sliding-window-maximum/solution/239-hua-dong-chuang-kou-zui-da-zhi-you-x-9qur/)
- 【题解】[239. 滑动窗口最大值 (优先队列&单调栈) - 滑动窗口最大值 - 力扣](https://leetcode.cn/problems/sliding-window-maximum/solution/239-hua-dong-chuang-kou-zui-da-zhi-you-x-9qur/)

0 comments on commit 14a4b28

Please sign in to comment.