Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. Alan Kay

Max heap priority queue

Language Java | Level Intermediate | Category Algorithms | August 3, 2015 8:03 am


Algorithm Problem Description

Priority queues insert the largest key value at the front of the queue (max heap). Write a program to implement max heap priority queue.

Output

          	        
          	        

Array of items for insert Priority Queue: [4, 1, 3, 2, 16, 9, 10, 14, 8, 7]
Itmes from Priority Queue: 16 14 10 8 7 3 9 1 4 2 
Itmes from Priority Queue extracted using Max items: 16 14 10 9 8 7 4 3 2 1 

          	        
          	        				    


Comments



Please login to add comments.