/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package heappriorityqueue; /** * * @author kvaradar */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here HeapPriorityQueue testPQ = new HeapPriorityQueue(); System.out.print("["); int x; for (int i = 0; i < 10; i++) { x = (int) (100 * Math.random()); System.out.print(" " + x); testPQ.insert(x,i); } System.out.println("]"); System.out.println(testPQ); for (int i = 0; i < 5; i++) { System.out.println(testPQ.removeMin()); System.out.println(testPQ); } } }