当前位置:网站首页>Stack and queue-p79-9
Stack and queue-p79-9
2022-07-07 06:34:00 【DanStevensBigFan】
The maximum capacity of the queue is MaxSize
This sentence does not mean that the number of elements when the queue is full is MaxSize
In this case, the maximum capacity is MaxSize
No other data members have been requested
The condition for judging the queue is Q.front == (Q.rear+1)%MaxSize
explain
Popular explanation ,(Q.rear+1)%MaxSize Represents in the loop queue (rear Value +1)
From the image, it is the current rear The next object of the object pointed to
%MaxSize Important properties of loops
Try a few more pictures , And substitute numbers
This method has additional data members size As the companion variable of the queue
This method has additional data members tag As companion variables for insert and delete operations
So from the three figures, it can be concluded that no other data members that meet the meaning of the question are Figure 1 , Waste a piece of memory
That is to say Q.front == (Q.rear+1)%MaxSize
边栏推荐
- UIC (configuration UI Engineering) public file library adds 7 industry materials
- Niuke Xiaobai monthly race 52 E. sum logarithms in groups (two points & inclusion and exclusion)
- Party A's requirements for those who have lost 800 yuan
- 当前发布的SKU(销售规格)信息中包含疑似与宝贝无关的字
- [Shell]常用shell命令及测试判断语句总结
- Abnova 体外转录 mRNA工作流程和加帽方法介绍
- MySQL的安装
- Redis(一)——初识Redis
- Abnova循环肿瘤DNA丨全血分离,基因组DNA萃取分析
- 「运维有小邓」符合GDPR的合规要求
猜你喜欢
String (explanation)
ICML 2022 | explore the best architecture and training method of language model
Navicat导入15G数据报错 【2013 - Lost connection to MySQL server during query】 【1153:Got a packet bigger】
Prompt for channel security on the super-v / device defender side when installing vmmare
POI export to excel: set font, color, row height adaptation, column width adaptation, lock cells, merge cells
一段程序让你明白什么静态内部类,局部内部类,匿名内部类
string(讲解)
matlab / ENVI 主成分分析实现及结果分析
[opencv] morphological filtering (2): open operation, morphological gradient, top hat, black hat
The difference between string constants and string objects when allocating memory
随机推荐
Several key steps of software testing, you need to know
开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
字符串常量与字符串对象分配内存时的区别
学术报告系列(六) - Autonomous Driving on the journey to full autonomy
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
Developers don't miss it! Oar hacker marathon phase III chain oar track registration opens
c面试 加密程序:由键盘输入明文,通过加密程序转换成密文并输出到屏幕上。
请问如何查一篇外文文献的DOI号?
2022Android面试必备知识点,一文全面总结
[SOC FPGA] custom IP PWM breathing lamp
How to find the literature of a foreign language journal?
Haqi projection Black Horse posture, avec seulement six mois de forte pénétration du marché des projecteurs de 1000 yuans!
循环肿瘤细胞——Abnova 解决方案来啦
Etcd database source code analysis -- starting from the start function of raftnode
C语言整理(待更新)
C面试24. (指针)定义一个含有20个元素的double型数组a
一段程序让你明白什么静态内部类,局部内部类,匿名内部类
程序员的日常 | 每日趣闻
JWT certification
面试中有哪些经典的数据库问题?