14If we choose to store at most N-1 elements in queue(N) then the algorithm becomes slightly simpler (exercise).