AI engineering glossary · Data structures algorithms

What is circular buffer?

Circular buffer (also called ring buffer): A fixed-size queue stored in an array where the read and write positions wrap around to the start when they reach the end. It avoids shifting items and never reallocates, so it is common in streaming and logging.

Level: intermediateTopic: Data structures algorithms

Circular buffer: an example

A buffer holding the last 100 sensor readings overwrites the oldest reading when the 101st arrives, using one array and two moving indices.

Related terms

More Data structures algorithms terms

Where you learn it

Circular buffer is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.