priority queue adtindependent of whether the heap is implemented with linked structure or an array list the heap-based implementation achieves fast running times for both insertion and removalunlike the list-based priority queue implementations indeedan important consequence of the efficiency of the heapbased implementation is that it can speed up priority-queue sorting to be much faster than the list-based insertion-sort and selection-sort algorithms java heap implementation java implementation of heap-based priority queue is shown in code frag ments to aid in modularitywe delegate the maintenance of the structure of the heap itself to complete binary tree code fragment class heappriorityqueuewhich implements priority queue with heap nested class myentry is used for the entries of the priority queuewhich form the elements in the heap tree (continues in code fragment