在具有 m 个单元的循环队列中,队头指针为 front,队尾指针为 rear,则

练习题库2022-08-02  21

问题 在具有 m 个单元的循环队列中,队头指针为 front,队尾指针为 rear,则队满的条件是( )。A.front==rear B.(front+1)%m==rearC.rear+1==front  D.(rear+1)%m==front

选项 A.front==rear
B.(front+1)%m==rear
C.rear+1==front  
D.(rear+1)%m==front

答案 D

解析 队列满的条件为(rear+1)%m==front。
转载请注明原文地址:https://tihaiku.com/gongwuyuan/2556311.html

最新回复(0)