ring buffer
A fixed-size buffer whose end wraps around to its start, used as a queue.
A ring buffer stores items in a fixed array with a head (next write) and a tail (next read) index that wrap back to zero at the end. It gives a queue with no allocation and constant-time operations.