Airbnb interview question

Implement a circular buffer using an array.