判断栈满-数据结构清华大学严蔚敏

3、判断栈满int stackfull(seqstack *s) { return(s–>top==stacksize-1); } 4、进栈void push(seqstack *s,datatype x) { if (stackfull(s)) error(“stack overflow”); s–>data[++s–>top]=x; }
ppt 文件大小:702.01KB