GlobalLogic interview question

they asked a max heap problem.