// CSE 373, Winter 2013, Marty Stepp // This client program uses our HeapIntPriorityQueue class. public class Lecture13Main { public static void main(String[] args) { IntPriorityQueue pq = new HeapIntPriorityQueue(); System.out.println("initially, queue = " + pq + ", size = " + pq.size()); int[] elements = {9, 33, 8, -3, 49, 72, 24, 15}; for (int n : elements) { pq.add(n); System.out.println("after adding " + n + ", queue = " + pq + ", size = " + pq.size()); } // while (!pq.isEmpty()) { // int min = pq.remove(); // remove minimum element // System.out.println(pq); // System.out.println("after removing " + min + ", queue = " + pq + ", size = " + pq.size()); // } } }