CSSE 230: Priority Queue
The purpose of this exercise is to learn about binary heaps.
- Work on this exercise by yourself.
- Implement a MyPriorityQueue class as documented at: Priority
Queue. Ensure you use the method signatures as specified.
- Please implement all methods except for the comparator(),
T[] toArray(T[] a) and spliterator() methods.
- You only need to implement the first constructor, i.e. the one
with no parameters.
- You must implement the MyPriorityQueue by extending ArrayList or
by haveing an ArrayList as a field. In eiher case, you must take
maximum advantage of inheritance.
- You must implement the MyPriorityQueue through a BinaryHeap and
ensure that the critical operations (add, offer and poll) run
in O(log(n)) time. See the documentation for more information.
- Use this test-suite as well as test cases of your
own design to debug your software.
- Submit your project to the appropriate drop-box on Moodle.