Pregunta de entrevista de Optimal (WA)

Write code to sort an array, explain algorithm, build a max heap, and there were some word problems/riddles.