正在加载图片...
3,1栈(堆栈) 顺序栈的基本运算 兴等为会CEmy() Sta aStac return(s->top==-1) 显示线中元素 Disp Stack③ void Dispstack( sqstack *s) 从栈顶到栈底顺序显示栈中所有元素。 int 1; for〔i=s>top;i>=0;i printf("%oc", s->datai printf("in") 1010 二. 顺序栈的基本运算 ⚫判断栈是否为空StackEmpty(s) int StackEmpty(SqStack *s) { return(s->top==-1); } ⚫ 显示栈中元素DispStack(s) void DispStack(SqStack *s) {//从栈顶到栈底顺序显示栈中所有元素。 int i; for (i=s->top;i>=0;i--) printf("%c ",s->data[i]); printf("\n"); } 3.1 栈(堆栈)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有