Roundtable Coders
Home
知识库
共读
通缉令
源码探秘
算法
Ani-Css
(opens new window)
项目复盘
进阶全栈
个人备忘
个人备忘
johninch
blog
blog
johninch
(opens new window)
Caleb
(opens new window)
niannings
(opens new window)
Xmtd
(opens new window)
febcat
(opens new window)
github
github
Roundtable
(opens new window)
esop-fed
(opens new window)
johninch
(opens new window)
Caleb
(opens new window)
niannings
(opens new window)
Xmtd
(opens new window)
febcat
(opens new window)
#
数据结构-堆
根据字符出现频率排序
超级丑数
(opens new window)
#
堆的概念
堆,一种特殊的二叉树,需满足如下两个条件:
1、必须是完全二叉树(除了最后一层,所有层的节点数达到最大,与此同时,最后一层的所有节点都在最左侧)
2、任一节点的值是其子树所有结点的最大值或最小值
56 / \ 19 40 /\ / 18 9 3 最大堆
5 / \ 16 30 /\ / 50 18 38 最小堆
←
平衡二叉树
topK问题
→