LeetCode
Design Circular Queue
Click
here
for an explanation.