Linqia interview question

Leetcode questions. Heaps related