题目内容:
最大容量为n的循环队列,队尾指针是rear,队头是front,则队空的条件是( )。
A.(rear+1)MOD n==front
B.rear==front
C.rear+1==front
D.(rear-l)MOD n==front
参考答案:
答案解析:
最大容量为n的循环队列,队尾指针是rear,队头是front,则队空的条件是( )。
A.(rear+1)MOD n==front
B.rear==front
C.rear+1==front
D.(rear-l)MOD n==front