数组q[M]存储一个循环队,first和last分别是首尾指针。当前队中元素个数为()。
A.(last-first M)%M
B.last-first 1
C.last-first-1
D.last-first
正确答案:(last-first M)%M
猜你喜欢