Lesson AB33 - PriorityQueues |
|
|
heapSort Background: A priority queue, implemented as a heap, can be used for sorting. To do that, we add all the items to a priority queue in any order, and then remove them one by one. The items will be returned in ascending order. This efficient algorithm is called heapSort. This lab will use a text file, file20.txt. The file contains Id/value pairs with the Id numbers in random order. Your program will use a PriorityQueue. Assignment:
|
|