Goldman Sachs interview question

A question on heap sort using python