阅读下列算法,简述其功能。
1.voidDemol(SeqStack*S){
inti,arr[64],n=0;
while(!StackEmpty(S))arr[n++]=Pop(S);
for(i=0;i}
2.SeqStackS1,S2,tmp;
DataTypeX;
…//假设栈tmp和S2已做过初始化
while(!StackEmpty(&S1))
{
X=Pop(&&S1);
Push(trap,x);
)
while(!StackEmpty(&tmp))
{
x=Pop(&tmp);
Push(g>S1,x);
Push(&>S2,x);
}
3.voidDemo2(SeqStack*S,intm)
{//设DataType为int型
SeqStackT;inti;
InitStack(&T);
while(!StackEmpty(S))
if((i=Pop(S))!=m)Push(&T,i);
while(!StackEmpty(&T))
{
i=Pop(&T);Push(S,i);
}