Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ BinaryHeap
Class
BinaryHeap
publication/code/chapter08/binary_heap.rs:22–25 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
20
// 二叉堆定义
21
#[derive(Debug, Clone)]
22
struct BinaryHeap {
23
size: usize, // 数据量
24
data: Vec<i32>, // 数据容器
25
}
26
27
impl BinaryHeap {
28
fn new() -> Self {
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected