Take out a piece of paper and put your name on the upper right corner.
public class ArrayQueue<E> implements Queue211<E> {
private E[] data;
private int front;
private int rear;
private int size;
...
public boolean add(E e) { // May throw an IllegalStateException
// your code here.
}
public E remove() { // May throw an IllegalStateException
// your code here.
}
...
}
Be sure to write JavaDoc comments for your code.
Conduct a quick review of your code, before you are done.
After the code, write an explanation the Big-O performance of both methods.
Bonus point: implement the LinkedList’s E remove(int index) method.
Hand in your code when you are done.
Take a short break and be back in your seats at
Time remaining: