/** * CSE 373, Spring 2011, Jessica Miller * A client program to test our IntPriorityQueue. */ public class IntPriorityQueueTest { private static int[] data = { 6, 50, 11, 25, 42, 20, 104, 76, 19, 55, 88, 2 }; public static void main(String[] args) { IntPriorityQueue pq = new IntBinaryHeap(); for (int i : data) { pq.add(i); } System.out.println(pq); System.out.println(pq.peek()); while (!pq.isEmpty()) { System.out.println(pq.remove()); System.out.println(pq); } } }