Pergunta de entrevista da empresa Goldman Sachs

Write the algorithm for heap up.