Search code examples
data-structurescircular-buffer

What is this data structure called?


In my current project I'll need a data structure with the following properties:

  • create with fixed size (for example 10)
  • add elements. When the capacity is reached the first element will be overwritten, next the seconds element will be overwritten, and so on...

How is this called? I'm guessing circular-something...


Solution

  • It sounds like a Circular buffer.