For this assignment, you will write two more implementations of a Priority Queue. Using the same interface as program #1, you will write two linked listed implementations.
Your implementations will be:
1.Ordered Singly Linked List 2.Unordered Singly Linked List
Both implementations must have identical behavior, and must implement the PriorityQueue interface used in program #1. The implementations must have a single no-argument constructor. As linked lists are never full, there is no default size or maximum size.
Thus, your project will consist of the following files. You must use exactly these filenames.
PriorityQueue.java The ADT interface (provided in Assignment 1)
OrderedLinkedListPriorityQueue.java The ordered list implementation.
UnorderedLinkedListPriorityQueue.java The unordered list implementation.
Additional Details:
Each method must be as efficient as possible. That is, a O(n) is unacceptable if the method could be written with O(log n) complexity.
You may not make any modifications to the PriorityQueue interface provided. I will grade your project with my copy of this file. This interface is UNCHANGED from project #1
All relevant requirements from the first assignment apply here. Of course, arrays will have a limited size but linked lists do not. Thus, all references to maximum size are not relevant for this assignment.
The isFull() method should be hardcoded to return false.
You should ignore (but do not remove) the DEFAULT_MAX_CAPACITY variable in the interface.
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.