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