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

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 文件大小:704.5KB