正在加载图片...
int push( DualStack* DS, Stack Data x, int 1)( if( Ds->t0+l--DS->t I return 0; if(i-0)t[0++; else t[ll DS->data Ds->ti=x; return 1; int Pop dualStack*DS, Stack Data &x, int 1)i if ( Ds->t1==Ds->bi)return 0 x= DS->data Ds->ti;\ if (i==0)t[O]--;else t[1++ return lint push ( DualStack *DS, StackData x, int i ) { if ( DS->t[0]+1 == DS->t[1] ) return 0; if ( i == 0 ) t[0]++; else t[1]--; DS->data[DS->t[i]] = x; return 1; } int Pop (DualStack *DS, StackData &x, int i ) { if ( DS->t[i] == DS->b[i] ) return 0; x = DS->data[DS->t[i]]; if ( i == 0 ) t[0]--; else t[1]++; return 1; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有