class Queue {
int front, rear, max, size;
int items[];
public Queue (int s) {
front = rear = -1;
max=5;
size=0;
items = new int [max];
}
// should we still include the "front" in this section?
public boolean enqueue (int x) {
if (size==max)
return false;
else {
items [rear+1]=x;
size++;
rear++; //rear=size-1;
return true;
}
i have a question.. what does the "front" do? should it be included in the public boolean enqueue (int x) ..........??