My understand of stack and queue
来源:互联网 发布:知彼网络 编辑:程序博客网 时间:2024/06/04 06:12
First:Abstract
stack and queue have the same logical structure like linear list. But the stack only can write and read at one side of the list; the queue only can write at one side of the list and read at the other side of the list.
Second:
1,stack:
(1)
include "top pointer" "bottom pointer" "stack size"
feature:FILO:first in last out
(2)create way
down:
top point to the high address while bottom point to the low address
when "pop" top-- "push" top++
up:
opposite compare above
(3)abstract data type
common stack
typedef struct
{
int *base;
int *top;
int stacksize;
} Stack;
link stack
typedef struct SNode
{
int data;
struct SNode *next;
} SNode, *LinkStack;
2,queue
stack and queue have the same logical structure like linear list. But the stack only can write and read at one side of the list; the queue only can write at one side of the list and read at the other side of the list.
Second:
1,stack:
(1)
include "top pointer" "bottom pointer" "stack size"
feature:FILO:first in last out
(2)create way
down:
top point to the high address while bottom point to the low address
when "pop" top-- "push" top++
up:
opposite compare above
(3)abstract data type
common stack
typedef struct
{
int *base;
int *top;
int stacksize;
} Stack;
link stack
typedef struct SNode
{
int data;
struct SNode *next;
} SNode, *LinkStack;
2,queue
0
上一篇:shell 编程语法总结(I/O 逻辑控制结构)
下一篇:My understand of KMP describe in C
相关热门文章
- openstack的liberty版本
- ORA-600(15599)错误
- 摄像头avcodec_encode_video2...
- nuttx记录2:nuttx几个函数说...
- 欢迎phoenixIkkiFullStack在Ch...
- test123
- 编写安全代码——小心有符号数...
- 使用openssl api进行加密解密...
- 一段自己打印自己的c程序...
- sql relay的c++接口
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
0 0
- My understand of stack and queue
- usage of stack and queue
- My understand of "iptables"
- simple version of stack and queue 's ADT
- My understand of KMP describe in C
- stack and queue
- Queue and Stack
- Queue and stack
- Stack and Queue
- List, Queue and Stack
- Stack and Queue
- the understand of SOA and Web Services
- My understand of Euclidean distance in digital image processing
- Tutorial Java – #8 Understand Stack and Heap
- queue by one stack、two stack and three stack
- Implementation of queue with 2 stack
- An Easy Problem Of BFS(queue stack)
- Stack and Queue Base on LinkedList
- apktool反编译详细使用教程
- hdu3377plan【哈密顿路径插头Dp】
- build makefile for my coding!!
- My understand of "iptables"
- shell 编程语法总结(I/O 逻辑控制结构)
- My understand of stack and queue
- My understand of KMP describe in C
- My first CXX problem:"aggregate has incomplete type and cannot be defined"
- define function pointer
- notes of C++
- My start of git
- 对搜索引擎的初了解发展及核心框架
- 搜索引擎之网络爬虫
- my makefile for CPP v2.0
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
江苏灯饰
家电灯饰
武汉灯饰
灯饰网站
灯饰厂
家用灯饰
阳光灯饰
灯饰批发城
美的灯饰
灯饰画
实木灯饰
灯饰专卖店
led灯饰
成都灯饰
米高灯饰
灯饰平台
灯饰展
豪华灯饰
古镇灯饰厂
中式灯饰
开个灯饰店怎么样
石家庄灯饰厂家
喜来灯灯饰城
广州灯饰批发市场
房间灯饰图片
佛山灯饰批发市场
中山古镇灯饰批发
照明灯饰公司
灯饰灯具批发市场
灯饰厂家直销
客厅灯饰大全
飞利浦灯饰照明
华艺灯饰照明股份有限公司
灯饰商标申请
灯饰灯具批发厂家
灯饰批发价格表
灯饰照明公司
灯饰灯具厂家
中山古镇灯饰网
广东灯饰厂家
灯饰照明品牌