问题
单项选择题
设数组data[0..m]作为循环队列SQ的存储空间,front为队头指针,rear为队尾指针,则执行出队操作的语句为
A.front:=front+1
B.front:=(front+1)mod m
C.rear:=(rear+1)mod m
D.front:=(front+1)mod(m+1)
答案
参考答案:D
设数组data[0..m]作为循环队列SQ的存储空间,front为队头指针,rear为队尾指针,则执行出队操作的语句为
A.front:=front+1
B.front:=(front+1)mod m
C.rear:=(rear+1)mod m
D.front:=(front+1)mod(m+1)
参考答案:D