import weiss.nonstandard.PriorityQueue;
import weiss.nonstandard.BinaryHeap;

public class PriorityQueueDemo
{
    public static void dumpPQ( String msg, PriorityQueue pq )
    {
        System.out.println( msg + ":" );
        while( !pq.isEmpty( ) )
            System.out.println( pq.deleteMin( ) );
    }

    // Do some inserts and removes (done in dumpPQ).
    public static void main( String [ ] args )
    {
        PriorityQueue minPQ = new BinaryHeap( );
        
        minPQ.insert( new Integer( 4 ) );
        minPQ.insert( new Integer( 3 ) );
        minPQ.insert( new Integer( 5 ) );

        dumpPQ( "minPQ", minPQ );
    }
}
