Java Algorithms - Circular Array Queue