Introduction to Python Heapq Module
A simple introduction on how to use Python’s heapq module
Published in
4 min readMay 6, 2020
A Heap is a special case of a binary tree where the parent nodes are compared to their children with their values and are arranged accordingly. If you have come across my previous article titled 8 Common Data Structures every Programmer must know that there are two types of heaps; min heap and max heap.