循环队列是空队列的条件是( )。A.Q - > rear = = Q - > f

最全题库2022-08-02  46

问题 循环队列是空队列的条件是( )。A.Q - > rear = = Q - > front B.(Q - > rear + 1)%maxsize = = Q - > front C.Q - > rear = = 0 D.Q - > front = = 0

选项 A.Q - > rear = = Q - > front
B.(Q - > rear + 1)%maxsize = = Q - > front
C.Q - > rear = = 0
D.Q - > front = = 0

答案 A

解析 如果循环队列的头指针与尾指针相等,代表该队列为空。(Q- > rear + 1)%maxsize = = Q - > front 则是判断队满的标识。
转载请注明原文地址:https://tihaiku.com/gongwuyuan/2556336.html

最新回复(0)