Arzooo Interview Question

Given one array problem using PriorityQueue.