Goldman Sachs interview question

Write the algorithm for heap up.