inital commit

This commit is contained in:
gabriel venberg 2021-03-26 22:39:35 -05:00
commit d1948b0e58
67 changed files with 5280 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/**
* Data Structures & Algorithms 6th Edition
* Goodrich, Tamassia, Goldwasser
* Code Fragment 6.9
*
* An implementation of the Queue interface
* */
/**
*
* @author Gabriel Venberg
*/
public interface Queue<E> {
/** returns the number of elements in the queue*/
int size();
/** tests whether the queue is empty*/
boolean isEmpty();
/**inserts an element at the rear of the queue*/
void enqueue(E e);
/**returns, but does not remove, the first element of the queue (null if empty). */
E first();
/** removes and returns the first element of the queue (null if empty)*/
E dequeue();
}