单选题
循环队列用数组A[0,m-1]存放其元素值,front指向队头元素的前一个位置,rear指向队尾元素,则当前队列的元素个数为______。(其中"%"为取余运算符)
A、
(rear-front+m)%m
B、
rear-front+1
C、
(rear-front+1)%m
D、
rear-front
【正确答案】
A
【答案解析】
提交答案
关闭