Both self-balancing binary trees and heaps are reasonable data structure choices for the Priority Queue ADT. In this lab you will experiment with two Priority Queue implementations, one based on Java's PriorityQueue class (which uses a heap) and one based on Java's TreeMap class (which uses a red-black tree).
TreeMinQueue.java
- Implementation based on Java's TreeMap class. YOU NEED TO IMPLEMENT THIS. (Note that this implementation will not allow duplicate priorities, since Map classes do not allow duplicate keys.)TreeMinQueue.java
and confirm that it works
correctly using the provided unit tests.PriorityQueueTimer.java
. Consult
with your partner to make predictions about which operations (if
any) will be faster for the heap implementation and which will be
faster for the BST implementation. Run the code to see if your
predictions were correct.There is nothing to submit for this lab.