The java API: java.sun.com/j2se/1.3/docs/api/

Lab 6:

Priority Queue Application

 

Assuming the test class name is PQTest and we are looking for the fifth smallest element in the set  {2,10,7,13,4,18,11,16,3}. we use:

> java PQTest 5 2 10 7 13 4 18 11 16 3
--------------------------------------------------------------------------------

The 5th smallest element is 10

--------------------------------------------------------------------------------