Intuit interview question

Priority queue related OOD question