該算法雖然直觀有效
char sz[
int used; //出棧序列總數
void stack_out (char s)
{char buff[
int len
strcpy (buff
len strlen(buff);
if(len>
{ch=buff [len
buff [
stack_out(buff);
num
numl=num
for(i=used
{strcpy(step
p=strchr(step
for(num=
{ql=sz[j];q
while(*q
*q
while(*q
*ql=
if(*p++=NULL) break;
}
num
}
used=numl;
}
else
{sz[
used=
}
}
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/22740.html