TuringSense Interview Question

Generate functions to implement a circular buffer given an array.