Pregunta de entrevista de Amazon

DSA based question utilizing Priority Queues