Goldman Sachs Interview Question

Write the algorithm for heap up.