Practice
Learn
← Quit
0 / 0 correct
Rust
Medium
1 of 20
Rust's BinaryHeap is a max-heap. How do you use it as a min-heap?
A
Use BinaryHeap::new_min()
B
Negate every element is the only way
C
Call heap.reverse()
D
Wrap elements in std::cmp::Reverse