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