Pergunta de entrevista da empresa Appian

leetcode type technical question on heaps