Cisco interview question

Design and write a code for a cyclic buffer used in routers.