Apple Interview Question

Implement a circular buffer in C