Implements a circular queue using a dynamically resizable array. The queue automatically expands its capacity when it becomes full and shrinks when a significant portion of its capacity is unused.