I think it may depend on the actual implementation of this. A practical example of what you are describing is a Circular Buffer or Ring Buffer, where the oldest data is overwritten with new data after the buffer is full. This would be one of the traditional ways of implementing such a data structure in something like C.
EDIT: Good, so the circular buffer is not suitable. What about buffer end queue or queue end capacity ? But they do not cover the self-limiting aspect ...
Self-limiting ultimate power of Bratt Queue.
Auto Negotiation ...
My point is that I donβt think that there is an official name for the data structure with the exact properties that you mention, so you can also do this based on the data structure that is closest to it, possibly in combination with Some of your structures have unique properties. It will probably be rather verbose, though ...
EDIT: Or maybe it's a Loop Queue . The article describes this as:
This article describes a queue similar to System.Collections.Queue, except that it has> a fixed buffer size. This means, of course, that the buffer cannot be large enough to> hold all the items added to the queue, in this case the oldest items are deleted.
... which is very similar to yours. Nice and concise.
Xiaofu
source share