Day 86: Binary heap
Priority queue is a data structure that supports some specialised operations based on priority [or key] of the item.
While there are many versions that differ in time complexity of operations and difficulty of the implementation, binary heap is very simple and space…