/*remove the minimum item throws underflowexception if empty *void deleteminifisemptythrow underflowexception}array std::movearraycurrentsize-)percolatedown )/*remove the minimum item and place it in minitem throws underflowexception if empty *void deletemincomparable minitem ifisemptythrow underflowexception}minitem std::movearray )array std::movearraycurrentsize-)percolatedown )/*internal method to percolate down in the heap hole is the index at which the percolate begins *void percolatedownint hole int childcomparable tmp std::movearrayhole )forhole <currentsizehole child child hole ifchild !currentsize &arraychild arraychild ++childifarraychild tmp arrayhole std::movearraychild )else breakarrayhole std::movetmp )figure method to perform deletemin in binary heap