Python heapq min and mix heap sticky note and sample implementation

I am relatively new to python and more of a Java developer. But I love python for its simplicity.

AFAIK Python has min heap out of the box, but max heap methods are available but hidden. Please refer Python docs here .

In this article I wanted to document my learning about how to use heapq for max heap operation and the extract step needed. Also a sample code comparison with Java PriorityQueue

My implementation (not original) of Min Heap (just for understand purpose)

--

--