Matsushita's Blog

Data Structure

Implementation of "Ring Buffer" in Java

What's "Ring Buffer" Ring Buffer is basically like Queue. The difference between Ring Buffer and normal Queue is that Ring Buffer is circular data structure. So, if tail and head index reach the index of max size, they are reseted zero. Th…