Min-Max Heap (four heaps)