Python Min Max Heap Simulation