Google interview question

Priority queue based problem solving