Pergunta de entrevista da empresa Expedia Group

priority queue question it was easy