Inefficient ArrayBasedQueue is implemented.