题目内容
(请给出正确答案)
[单选题]
若某循环队列有队首指针front和队尾指针rear,在队不空时出队操作仅会改变()。
A.front
B.rear
C.front和rear
D.以上都不对
答案
A、front
如果结果不匹配,请 联系老师 获取答案
A.front
B.rear
C.front和rear
D.以上都不对
A、front
在一个链队列中,假定front和rear分别为队首和队尾指针,则删除一个节点的操作为()。
A.front=front→next
B.rear=rear→next
C.rear=front→next
D.front=rear→next
A.rear%n==front
B.front+l=rear
C.rear==front
D.(rear+l)%n=front
A、q.rear-q.front
B、q.rear-q.front+1
C、(q.rear-q.front)%maxSize+1
D、(q.rear-q.front+maxSize)%maxSize
A.7和1
B.1和7
C.5和1
D.1和5
若链队列的队头指针和队尾指针分别为front和rear,则从队列中删除一个结点的操作是_______。
A.p=front;rear=p一>next;free(p);
B.p=rear;front=p;free(p);
C.p=front;front=P一>next;free(p);
D.p=rear;front=P一>next;free(p);
A.qu.rear++
B.qu.rear=(qu.rear+1)%N
C.qu.front++;
D.qu.front=(qu.front+1)%N