队列 数据结构_什么是队列数据结构?

队列 数据结构

Queue is also an abstract data type or a linear data structure, just like stack data structure, in which the first element is inserted from one end called the REAR(also called tail), and the removal of existing element takes place from the other end called as FRONT(also called head).

队列也是抽象数据类型或线性数据结构,就像堆栈数据结构一样 ,其中第一个元素从称为REAR的一端(也称为tail )插入,而现有元素的删除从另一端进行称为FRONT (也称为head )。

This makes queue as FIFO(First in First Out) data structure, which means that element inserted first will be removed first.

这使队列成为FIFO (先进先出)数据结构,这意味着首先插入的元素将被首先移除。

Which is exactly how queue system works in real world. If you go to a ticket counter to buy movie tickets, and are first in the queue, then you will be the first one to get the tickets. Right? Same is the case with Queue data structure. Data inserted first, will leave the queue first.

队列系统在现实世界中正是这样工作的。 如果您去售票处购买电影票,并且排在第一位,那么您将是第一个获得票的人。 对? 队列数据结构也是如此。 首先插入的数据,将首先离开队列。

The process to add an element into queue is called Enqueue and the process of removal of an element from queue is called Dequeue.

将元素添加到队列中的过程称为Enqueue ,从队列中删除元素的过程称为Dequeue

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值