1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/** A queue of objects of type T. 
 * DO NOT CHANGE THIS INTERFACE or I won't be able to run your code! */
public interface Queue<T> {
  /** Returns the number of items in the queue. */
  public int size();
 
  /** Adds a new item to the end of the queue. */
  public void enqueue(T element);
 
  /** Returns and removes the item at the front of the queue. */
  public T dequeue();
 
  /** Returns but does NOT remove the item at the front of the queue. */
  public T peek();
}