Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/douchuan/algorithm
/ top_m
Function
top_m
tests/test_common.rs:176–182 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
174
175
#[test]
176
fn top_m() {
177
let mut top = TopM::new(5);
178
for v in 0..100 {
179
top.insert(v);
180
}
181
assert_eq!(vec![99, 98, 97, 96, 95], top.into_vec());
182
}
Callers
nothing calls this directly
Calls
1
insert
Method · 0.45
Tested by
no test coverage detected