Orange Logic* interview question

Basic datastructure and Heap question.