正在加载图片...
判栈空 int Stack Empty (Link Stack *S)t return S->top== NULL 出栈 int Pop( linkStack *S, StackData &x)& if( Stack Empty(S)) return 0 StackNode *p=S->top; S->top=p->link x=p->data; free (p) return 1▪ 判栈空 int StackEmpty (LinkStack *S) { return S->top == NULL; } ▪ 出栈 int Pop ( LinkStack *S, StackData &x ) { if ( StackEmpty (S) ) return 0; StackNode * p = S->top; S->top = p->link; x = p->data; free (p); return 1; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有