performance of priority queue realized by means of heapwhich is in turn implemented with an array list or linked structure we denote with the number of entries in the priority queue at the time method is executed the space requirement is (nthe running time of operations insert and removemin is worst case for the array-list implementation of the heap and amortized for the linked representation operation time sizeisempty ( mino( insert (lognremovemin (lognin shorteach of the priority queue adt methods can be performed in ( or in (logntimewhere is the number of entries at the time the method is executed the analysis of the running time of the methods is based on the followingthe heap has nodeseach storing reference to an entry operations add and remove on take either ( amortized time (arraylist representationor (lognworst-case time in the worst caseup-heap and down-heap bubbling perform number of swaps equal to the height of the height of heap is (logn)since is complete (proposition