Microsoft Interview Question

Write get and put functions for a circular buffer.