Question DSA-HEAP-0010
MediumHow do you get a max-heap from Python's heapq, which only provides a min-heap?
- A.
It isn't possible
- B.
Push the negatives of the values and negate them again when popping
- C.
Use heapq.maxheap()
- D.
Sort the list in reverse
Sign up free to see the answer and a step-by-step explanation.