Insert, extract – min is performed on unsorted array.
Insert: It means insertion of element in unsorted array. In the worst case, element is inserted at the
end of the queue. Simply inserting the element at the end of queue takes O(1) complexity.
Extract –min: To do extract – min, use linear search approach for worst case to find the minimum
element. For this, we need to traverse all the elements of the queue in worst case. So, it will take
O(n) time complexity to extract –min in priority queue.