removing items from binary heap notes the dequeuemin method removes from priority queue the item having the smallest key in order to remove the smallest itemit needs first to be located thereforethe dequeuemin operation is closely related to findmin the smallest item is always at the root of min heap thereforethe findmin operation is trivial program gives the code for the findmin method of the binaryheap class assuming that no exception is thrownthe running time of findmin is clearly ( public class binaryheap extends abstractcontainer implements priorityqueue protected comparable [arraypublic comparable findmin (if (count = throw new containeremptyexception ()return array [ ]/program binaryheap class findmin method since the bottom row of complete tree is filled from left to right as items are addedit follows that the bottom row must be emptied from right to left as items are removed soyou have problemthe datum to be removed from the heap by dequeuemin is in the rootbut the node to be removed from the heap is in the bottom row figure removing an item from binary heap lovely professional university