3.堆栈和队列概要.pptVIP

  • 5
  • 0
  • 约1.21万字
  • 约 71页
  • 2017-05-27 发布于湖北
  • 举报
3.堆栈和队列概要

while(QueueNotEmpty(myQueue)==1 StackNotEmpty(myStack)==1) { QueueDelete(myQueue,x); StackPop(myStack,y); if(x!=y) { printf(“不是回文!”); return 0; } } printf(是回文!); return 1; } StackInitiate(qstype *s) { s-top=-1; } int StackPush (qstype *s,elemtype x) { if(s-top=MAXNUM-1) return 0; else { s-stack[++(s-top)]=x; return 1; } } int StackPop (qstype *s,elemtype *y) { *y=s-stack[(s-top)]; (s-top) --; return 1; } int StackNotEmpty (qs

文档评论(0)

1亿VIP精品文档

相关文档