New York Life interview question

1. Leetcode question based on Priority Queue