public Item dequeue() {
		if (isEmpty())
			throw new NoSuchElementException();

		if (size() < N / 2)
			q = resize(N / 2);

		// Remove from the front.
		Item t = q[front];
		front = (front + 1) % N;
		nItems--;
		return t;
	}