Google interview question

Dynamic Programming, Heap (Priority Queue), Array