GlobalLogic Interview Question

they asked a max heap problem.