Question: import java.util.Queue; import java.util.NoSuchElementException; //Class for a simple queue based on SimpleList //The front of the queue should be the front of //the list. //READ
import java.util.Queue; import java.util.NoSuchElementException;
//Class for a simple queue based on SimpleList //The "front" of the queue should be the front of //the list.
//READ THE DOCUMENTATION for the Queue interface for more information //on how these methods should work and when exceptions should //be thrown. This data structure does not allow adding null.
//DO NOT re-implement nodes in this class... remember how //inheritance works in Java and make use of that! class SimpleQueue
public T remove() { //O(1) return null; }
public T poll() { //O(1) return null; } public T element() { //O(1) return null; } public T peek() { //O(1) return null; } //------------------------------------------------------------- // Main Method For Your Testing -- Edit all you want //------------------------------------------------------------- public static void main(String[] args){ SimpleQueue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
