HCLTech Interview Question

Using array as a queue