ServiceNow interview question

Min heap and sorting question