题目内容
(请给出正确答案)
[单选题]
最大容量为n的循环队列,队尾指针是rear,队头是front,则队空的条件是()。
A.(rear+1)%n==front
B.rear==front
C.rear+1==front
D.(rear-l)%n==front
查看答案
如果结果不匹配,请 联系老师 获取答案
A.(rear+1)%n==front
B.rear==front
C.rear+1==front
D.(rear-l)%n==front
:Afront=front+1
Bfront=(front+1)% m
Crear=(rear+1)%m
Dfront=(front+1)%(m+1)
A、front=(front+1)%m
B、front=(front-1)%m
C、front=front+1
D、front=(front+1)%(m-1)