基于 Python 的数据结构与算法分析学习记录(6-9)—— 二叉堆操作
2017-05-08 10:41
489 查看
BinaryHeap()创建一个新的,空的二叉堆。
insert(k)向堆添加一个新项。
findMin()返回具有最小键值的项,并将项留在堆中。
delMin()返回具有最小键值的项,从堆中删除该项。
如果堆是空的,
isEmpty()返回 true,否则返回 false。
size()返回堆中的项数。
buildHeap(list)从键列表构建一个新的堆。
相关文章推荐
- 基于 Python 的数据结构与算法分析学习记录(6-11)—— 二叉查找树与操作
- 基于 Python 的数据结构与算法分析学习记录(6-8)—— 基于二叉堆的优先队列
- 基于 Python 的数据结构与算法分析学习记录(6-10)—— 二叉堆实现
- 基于 Python 的数据结构与算法分析学习记录(6-7)—— 树的遍历
- Python数据结构与算法分析学习记录(1)——基于Problem Solving with Algorithms and Data Structures using Python的学习
- 基于 Python 的数据结构与算法分析学习记录(6-5)——树的节点表示
- Python数据结构与算法分析学习记录(2)——基于Problem Solving with Algorithms and Data Structures using Python的学习
- 基于 Python 的数据结构与算法分析学习记录(6-6)—— 分析树
- redis学习记录(redis的持久化操作、基于java的jedis操作)
- python文件操作+字符串操作 总结(学习记录)
- 【python学习记录】--1--对图片的基本操作
- 基于Problem Solving with Algorithms and Data Structures using Python的学习记录(5)——Sorting
- 基于Problem Solving with Algorithms and Data Structures using Python的学习记录(3)——Basic Data Structures
- python 学习记录(3)—文件操作
- 学习记录:python serial 库&excel操作
- redis学习记录(redis的持久化操作、基于java的jedis操作)
- Python学习记录——常用的IO操作及代替批处理命令
- 我的Appium学习记录——Python IOS appium& selenium 自动化基础操作
- 基于Problem Solving with Algorithms and Data Structures using Python的学习记录(6-1)——Tree
- python学习之数据库操作