Amazon interview question

Arrays, binary search, priority queue