Citadel interview question

Write a C++ class for ring buffer.