Arzooo interview question

Given one array problem using PriorityQueue.