设以数组A[O..m-1]存放循环队列,front指向队头元素,rear指向队尾元素的下一个位置,则当前队列中的元素个数为()
A.(rear-front+m)%m
B.rear-front+1
C.(front-rear+m)%m
D.(rear-front)%m
正确答案是A
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。
本文链接:https://doc.20230611.cn/post/431817.html
上一篇:Passage 6 Two men walked slowly, one after the other, through the shallow water of a stream. All they could see were stones and earth. The stream ran cold over their feet. They had blanket packs on their backs. They had guns, but no bullets; matches
下一篇:急性肾小球肾炎营养治疗中进水量的估计法是()