Question d’entretien chez Optimal (WA)

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