Question d’entretien chez Nextbite

Problem to solve on coderpad which involves using priority queues and heaps