Pregunta de entrevista de Applied Intuition

LC style question based on heap data structure.