Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/douchuan/algorithm
/ insert
Method
insert
src/common/max_heap.rs:57–61 ·
view source on GitHub ↗
(&mut self, key: K)
Source
from the content-addressed store, hash-verified
55
}
56
57
pub fn insert(&mut self, key: K) {
58
let i = self.keys.len();
59
self.keys.push(key);
60
heap_fix(&mut self.keys, i);
61
}
62
63
//for test
64
pub fn keys_slice(&self) -> &[K] {
Callers
nothing calls this directly
Calls
3
heap_fix
Function · 0.85
push
Method · 0.80
len
Method · 0.45
Tested by
no test coverage detected