文件名称:新建文本文档
介绍说明--下载内容来自于网络,使用问题请自行百度
一、循环队列的基础知识
1.循环队列需要几个参数来确定
循环队列需要2个参数,front和rear
2.循环队列各个参数的含义
(1)队列初始化时,front和rear值都为零;
(2)当队列不为空时,front指向队列的第一个元素,rear指向队列最后一个元素的下一个位置;
(3)当队列为空时,front与rear的值相等,但不一定为零;
3.循环队列入队的伪算法
(1)把值存在rear所在的位置;
(2)rear=(rear+1)%maxsize ,其中maxsize代表数组的长度;(I. Basic knowledge of circular queues
1. Loop queues require several parameters to determine
Loop queue requires 2 parameters, front and rear
2. The meaning of each parameter of the loop queue
(1) When the queue is initialized, both front and rear values are zero;
(2) When the queue is not empty, front points to the first element of the queue, rear to the next position of the last element of the queue;
(3) When the queue is empty, the value of front and rear is equal, but not necessarily zero;
3. The team's pseudo algorithm
(1) Where the value exists in the rear position;
(2) rear= (rear+1)%maxsize, wherein maxsize represents the length of the array;)
1.循环队列需要几个参数来确定
循环队列需要2个参数,front和rear
2.循环队列各个参数的含义
(1)队列初始化时,front和rear值都为零;
(2)当队列不为空时,front指向队列的第一个元素,rear指向队列最后一个元素的下一个位置;
(3)当队列为空时,front与rear的值相等,但不一定为零;
3.循环队列入队的伪算法
(1)把值存在rear所在的位置;
(2)rear=(rear+1)%maxsize ,其中maxsize代表数组的长度;(I. Basic knowledge of circular queues
1. Loop queues require several parameters to determine
Loop queue requires 2 parameters, front and rear
2. The meaning of each parameter of the loop queue
(1) When the queue is initialized, both front and rear values are zero;
(2) When the queue is not empty, front points to the first element of the queue, rear to the next position of the last element of the queue;
(3) When the queue is empty, the value of front and rear is equal, but not necessarily zero;
3. The team's pseudo algorithm
(1) Where the value exists in the rear position;
(2) rear= (rear+1)%maxsize, wherein maxsize represents the length of the array;)
相关搜索: 数据结构:循环队列(C语言实现)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
新建文本文档.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.