Meta interview question

Min heap and sorting problem