import java.util.NoSuchElementException;

/**
 * A binary heap, with the minimum at the root.
 * @param <K> A comparable element stored by this heap.
 * @author CIS-121 Staff
 * @version 1.0 - 03/19/08
 */
public interface BinaryMinHeapI<K extends Comparable<? super K>>
{
	/**
	 * Returns true if this heap is empty.
	 * @return True if this heap is empty.
	 */
    public boolean isEmpty();
    
    /**
     * Removes the minimum key in this heap, and returns it.
     * @return The minimum key in this heap, and returns it.
     * @throws NoSuchElementException If the heap is empty.
     */
    public K removeMin() throws NoSuchElementException;
    
    /**
     * Insert the given key into the heap.
     * @param k The key to insert.
     */
    public void insert(K k);
}
