This commit is contained in:
krahets
2024-04-22 01:45:06 +08:00
parent 2f5cc98102
commit e95b3bddf2
7 changed files with 50 additions and 11 deletions

View File

@@ -431,7 +431,7 @@ comments: true
## 8.1.2   堆的实现
下文实现的是大顶堆。若要将其转换为小顶堆,只需将所有大小逻辑判断取逆(例如,将 $\geq$ 替换为 $\leq$ )。感兴趣的读者可以自行实现。
下文实现的是大顶堆。若要将其转换为小顶堆,只需将所有大小逻辑判断进行逆转(例如,将 $\geq$ 替换为 $\leq$ )。感兴趣的读者可以自行实现。
### 1.   堆的存储与表示