Updated binary heap with map