Orange Logic* Interview Question

Basic datastructure and Heap question.