Domanda di colloquio di Citadel

Heap based question for techincal problem