Find the largest M integers. This implementation uses a MinPQ of size at most m + 1 to identify the M largest elements.
| 4 | /// This implementation uses a MinPQ of size |
| 5 | /// at most m + 1 to identify the M largest elements. |
| 6 | pub struct TopM<T> { |
| 7 | pq: PQ<T>, |
| 8 | m: usize, |
| 9 | } |
| 10 | |
| 11 | impl<T: PartialOrd + Default> TopM<T> { |
| 12 | pub fn new(m: usize) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected