Domanda di colloquio di Applied Intuition

LC style question based on heap data structure.