Pregunta de entrevista de Enthought

How does Heap Sort works?