Using a deque to improve the speed of removing from the left side of the queue and rotating students to the back of the queue (from O(n) to O(1) amortized).