我爱编程

2018-05-28

2018-05-28  本文已影响0人  zhouxu123

1.栈 

后进先出

入栈int top=-1;         出栈char c=data[top];

            top++;            top--;

           data[top]=’A’;

2.队列

rear队尾;

rear++;

rear=(rear+1)%MAX 实现循环;入队条件;

front==(rear+1)%MAX满队条件;

rear==front空队条件;

入rear动,出front动;

flag=1满了,=0空的;

del删除;

malloc(4)申请4个字节;

上一篇 下一篇

猜你喜欢

热点阅读