/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sortedlistpriorityqueue; /** * * @author kvaradar */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here MyPriorityQueue pq = new SortedListPriorityQueue(); pq.insert(5,5); pq.insert(4,4); pq.insert(12,12); pq.insert(1,1); pq.insert(17,17); while(!pq.isEmpty()) { System.out.println(pq.removeMin().getKey()); } } }