Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/douchuan/algorithm
/ BinaryHeap
Class
BinaryHeap
src/common/max_heap.rs:17–19 ·
view source on GitHub ↗
用数组实现隐式二叉堆 (最大堆)
Source
from the content-addressed store, hash-verified
15
16
/// 用数组实现隐式二叉堆 (最大堆)
17
pub struct BinaryHeap<K> {
18
keys: Vec<K>, // 索引从0开始
19
}
20
21
impl<K> BinaryHeap<K>
22
where
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected