Vayyar interview question

To do a Cycle buffer implementation