Qualcomm interview question

circular buffer