[数据结构]环形队列

Tags
数据结构
notion image
环形队列计算当前队列长度:quelen = (rear - head + maxsize) % maxsize
环形队列判断队满:(rear + 1) % maxsize == head