Google interview question

Based on the concepts of priority queue