Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

DS_Doc_2_4_顺序队列

KimYang edited this page Oct 10, 2020 · 1 revision

顺序队列

image-20200624154351327

顺序队列的定义

image-20200624154511213

顺序队列的初始化

image-20200624154606843

入队操作

image-20200624155112673

image-20200624155125271

循环队列

image-20200624155155915

image-20200624155216098

出队

image-20200624155258305

判空/判满

方案一:牺牲一个存储空间

image-20200624155343663

方案二:利用size变量记录队列长度

image-20200624155414159

方案三:利用tag记录最后一次操作

image-20200624155619066

其它实现方式

image-20200624155808035

image-20200624155827353

image-20200624155906039

总结

image-20200624160059508

Clone this wiki locally