Citadel Securities interview question

implement ring buffer structure, write and read function