文件名称:queue
介绍说明--下载内容均来自于网络,请自行研究使用
(一)题目: 假设以带头结点的循环链表表示队列,并且只设一个指针指向队尾元素结点而不设头指针,试编写相应的队列初始化、入队列、出队列和判断队列状态的算法。
利用上述算法完成下面的各操作,并在每一操作后输出队列状态。
1)下列元素逐一入队:5,7,3,8,55 状态:5个元素
2) 3个元素出队 状态:2个元素
3)再2个元素出队 状态:队空
4)再1个元素出队 状态:队空(指示下溢)
-(A) Title: Suppose to take the lead in the cycle of nodes that the queue list, and only set a pointer to the tail element node instead of being the head pointer and try to prepare the corresponding queue is initialized into the queue, the queue and determine the queue state algorithm. Complete the following using the above method of the operation and after operation in each output queue status. 1) The following elements one by one into the team: 5,7,3,8,55 Status: 5 elements 2) three elements of the Team Status: 2 element 3) and then two elements of the Team Status: Team Air 4) and then 1 elements out of Team Status: Team space (under the direction of overflow)
利用上述算法完成下面的各操作,并在每一操作后输出队列状态。
1)下列元素逐一入队:5,7,3,8,55 状态:5个元素
2) 3个元素出队 状态:2个元素
3)再2个元素出队 状态:队空
4)再1个元素出队 状态:队空(指示下溢)
-(A) Title: Suppose to take the lead in the cycle of nodes that the queue list, and only set a pointer to the tail element node instead of being the head pointer and try to prepare the corresponding queue is initialized into the queue, the queue and determine the queue state algorithm. Complete the following using the above method of the operation and after operation in each output queue status. 1) The following elements one by one into the team: 5,7,3,8,55 Status: 5 elements 2) three elements of the Team Status: 2 element 3) and then two elements of the Team Status: Team Air 4) and then 1 elements out of Team Status: Team space (under the direction of overflow)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
queue.cpp