Fenceposts and buffers
Suppose we have an N-element array that we wish to fill progressively and empty whenever it fills up
Then we might use n to represent
- the number of elements used, or
- (equivalently) the index of the first element beyond the occupied area (if the initial element has index 0)