当前位置:网站首页>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
边栏推荐
- 路径依赖 - 偶然决策导致的依赖。
- QCon Guangzhou Station is here!Exclusive custom backpacks are waiting for you!
- 【云原生】微服务之Feign的介绍与使用
- Squarespace 和 WordPress 的区别
- Kubernetes基本概念
- 【每日SQL打卡】DAY 27丨列出指定时间段内所有的下单产品【难度简单】
- 【每日SQL打卡】DAY 21丨报告系统状态的连续日期【难度困难】
- 1.4, stack
- 【每日SQL打卡】DAY 20丨查询球队积分【难度中等】
- APP local number one-click login
猜你喜欢

网络层和传输层限制

MarkDown高阶语法手册

【day04】IDEA、方法
![[based] GO language. Why do I have to learn Golang and introduction to the language universal](/img/ac/80ab67505f7df52d92a206bc3dd50e.png)
[based] GO language. Why do I have to learn Golang and introduction to the language universal

1.4、栈

Chapter ten find and record the REST API

Bookkeeping APP: Xiaoha Bookkeeping 3 - Production of Login Page

IO流:节点流和处理流详细归纳。

2.1 Bubble sort (mercifully Sorting)

爱可可AI前沿推介(7.29)
随机推荐
DAY 20 daily SQL clock 】 【 丨 query results of quality and than simple difficult 】 【
公司出了一款新产品,要不要招代理商?
一文带你搞懂JSON和TCP/IP
js 数组常用API
【每日SQL打卡】DAY 24丨不同国家的天气类型【难度简单】
吴恩达老师机器学习课程笔记 07 正则化
TiCDC迁移-TiDB到MySQL测试
【每日SQL打卡】DAY 21丨每个帖子的评论数【难度中等】
Based article 】 【 learn with Rust | Rust, variables and data types
MLX90640 infrared thermal imaging temperature measuring sensor module development notes (9)
第二章总结
APP local number one-click login
TiDB upgrade share with case (TiDB v4.0.1 to v5.4.1)
跨域: 汇总
框架常用注解解释
基础架构之分布式配置中心
栈“后进先出”和队列中“先进先出”的含义
【云原生】微服务之Feign的介绍与使用
piglit_get_gl_enum_name 参数遍历
TiCDC Migration - TiDB to MySQL Test