当前位置:网站首页>The meaning of "last in first out" in stack and "first in first out" in queue
The meaning of "last in first out" in stack and "first in first out" in queue
2022-07-29 12:33:00 【Princess palace early】
从定义来说,
栈
限定仅在表尾进行插入或删除操作的线性表.That is to say it has two operations,And the operands are all at the end of the linear list
队列
是一种特殊的线性表,它只允许在表的前端(front)进行删除操作,而在表的后端(rear)进行插入操作.
This means that the objects of its insertion and deletion operations are different
Operands of these two basic operations(参数)The difference constitutes the effect of FIFO and LIFO.
For example also in the linear table “按顺序” 插入1,2,3,4
对于栈,Only trailing deletions are allowed,So the one that pops first will be4,即后进先出
形象点说,栈只有一个开口,The first to go is the bottom,The last one is in the front,要是拿出去的话,肯定是从开口端拿出去,所以说先进后出,后进先出.
对于队列,Only allowed to delete in the head,So the first to go is1,即先进先出
https://blog.csdn.net/yang_study_first/article/details/103933409?ops_request_misc=&request_id=&biz_id=102&utm_term=%E6%A0%88%20%E9%98%9F%E5%88%97&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-2-103933409.first_rank_v2_pc_rank_v29&spm=1018.2226.3001.4187
https://blog.csdn.net/Marmara01/article/details/89014828?ops_request_misc=&request_id=&biz_id=102&utm_term=%E6%A0%88%20%E9%98%9F%E5%88%97&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-89014828.first_rank_v2_pc_rank_v29&spm=1018.2226.3001.4187
边栏推荐
- XSS漏洞分析
- html+css+php+mysql实现注册+登录+修改密码(附完整代码)
- 最简单的共享列表服务器KissLists
- Recursion - Eight Queens Problem
- DAY 20 daily SQL clock 】 【 丨 query difficulty moderate 】 【 team integral
- 【每日SQL打卡】DAY 25丨求团队人数【难度中等】
- Wu En 07 regularization of teacher machine learning course notes
- 【day04】IDEA, method
- WordPress 版本更新
- influxdb2的使用
猜你喜欢
随机推荐
框架常用注解解释
[based] GO language. Why do I have to learn Golang and introduction to the language universal
PD 源码分析- Checker: region 健康卫士
【每日SQL打卡】DAY 24丨不同国家的天气类型【难度简单】
DAY 22 丨 daily SQL clock 】 【 the average selling price of the difficulty of medium 】
MLX90640 红外热成像仪测温传感器模块开发笔记(九)
【微信小程序】WXSS和全局、页面配置
WordPress 主题和插件
SQL clock 】 【 daily DAY 23 丨 reporting to the CEO job difficulty moderate 】 【
DAY 25 丨 daily SQL clock 】 【 o team number [difficult medium]
The company has a new product, do you want to hire an agent?
"Pure theory" FPN (Feature Pyramid Network)
365天挑战LeetCode1000题——Day 043 有效的正方形 数学
AI cocoa AI frontier introduction (7.29)
Paddle frame experience evaluation and exchange meeting, the use experience of the product is up to you!
Wu En 07 regularization of teacher machine learning course notes
2.1 Bubble sort (mercifully Sorting)
【实用工具】Image Assistant下载指定页面的所有图片
【每日SQL打卡】DAY 22丨平均售价【难度中等】
命里有时终须有--记与TiDB的一次次擦肩而过









