入栈顺序a,b,c,d,e,求出栈顺序有多少种?(过程打印)
==========print.txt==========
===[1]===
a <- bcde
ab <- cde
abc <- de
abcd <- e
abcde <-
abcd ->
abc ->
ab ->
a ->
->
===[2]===
a <- bcde
ab <- cde
abc <- de
abcd <- e
abc -> e
abce <-
abc ->
ab ->
a ->
->
===[3]===
a <- bcde
ab <- cde
abc <- de
abcd <- e
abc -> e
ab -> e
abe <-
ab ->
a ->
->
===[4]===
a <- bcde
ab <- cde
abc <- de
abcd <- e
abc -> e
ab -> e
a -> e
ae <-
a ->
->
===[5]===
a <- bcde
ab <- cde
abc <- de
abcd <- e
abc -> e
ab -> e
a -> e
-> e
e <-
->
===[6]===
a <- bcde
ab <- cde
abc <- de
ab -> de
abd <- e
abde <-
abd ->
ab ->
a ->
->
===[7]===
a <- bcde
ab <- cde
abc <- de
ab -> de
abd <- e
ab -> e
abe <-
ab ->
a ->
->
===[8]===
a <- bcde
ab <- cde
abc <- de
ab -> de
abd <- e
ab -> e
a -> e
ae <-
a ->
->
===[9]===
a <- bcde
ab <- cde
abc <- de
ab -> de
abd <- e
ab -> e
a -> e
-> e
e <-
->
===[10]===
a <- bcde
ab <- cde
abc <- de
ab -> de
a -> de
ad <- e
ade <-
ad ->
a ->
->
===[11]===
a <- bcde
ab <- cde
abc <- de
ab -> de
a -> de
ad <- e
a -> e
ae <-
a ->
->
===[12]===
a <- bcde
ab <- cde
abc <- de
ab -> de
a -> de
ad <- e
a -> e
-> e
e <-
->
===[13]===
a <- bcde
ab <- cde
abc <- de
ab -> de
a -> de
-> de
d <- e
de <-
d ->
->
===[14]===
a <- bcde
ab <- cde
abc <- de
ab -> de
a -> de
-> de
d <- e
-> e
e <-
->
===[15]===
a <- bcde
ab <- cde
a -> cde
ac <- de
acd <- e
acde <-
acd ->
ac ->
a ->
->
===[16]===
a <- bcde
ab <- cde
a -> cde
ac <- de
acd <- e
ac -> e
ace <-
ac ->
a ->
->
===[17]===
a <- bcde
ab <- cde
a -> cde
ac <- de
acd <- e
ac -> e
a -> e
ae <-
a ->
->
===[18]===
a <- bcde
ab <- cde
a -> cde
ac <- de
acd <- e
ac -> e
a -> e
-> e
e <-
->
===[19]===
a <- bcde
ab <- cde
a -> cde
ac <- de
a -> de
ad <- e
ade <-
ad ->
a ->
->
===[20]===
a <- bcde
ab <- cde
a -> cde
ac <- de
a -> de
ad <- e
a -> e
ae <-
a ->
->
===[21]===
a <- bcde
ab <- cde
a -> cde
ac <- de
a -> de
ad <- e
a -> e
-> e
e <-
->
===[22]===
a <- bcde
ab <- cde
a -> cde
ac <- de
a -> de
-> de
d <- e
de <-
d ->
->
===[23]===
a <- bcde
ab <- cde
a -> cde
ac <- de
a -> de
-> de
d <- e
-> e
e <-
->
===[24]===
a <- bcde
ab <- cde
a -> cde
-> cde
c <- de
cd <- e
cde <-
cd ->
c ->
->
===[25]===
a <- bcde
ab <- cde
a -> cde
-> cde
c <- de
cd <- e
c -> e
ce <-
c ->
->
===[26]===
a <- bcde
ab <- cde
a -> cde
-> cde
c <- de
cd <- e
c -> e
-> e
e <-
->
===[27]===
a <- bcde
ab <- cde
a -> cde
-> cde
c <- de
-> de
d <- e
de <-
d ->
->
===[28]===
a <- bcde
ab <- cde
a -> cde
-> cde
c <- de
-> de
d <- e
-> e
e <-
->
===[29]===
a <- bcde
-> bcde
b <- cde
bc <- de
bcd <- e
bcde <-
bcd ->
bc ->
b ->
->
===[30]===
a <- bcde
-> bcde
b <- cde
bc <- de
bcd <- e
bc -> e
bce <-
bc ->
b ->
->
===[31]===
a <- bcde
-> bcde
b <- cde
bc <- de
bcd <- e
bc -> e
b -> e
be <-
b ->
->
===[32]===
a <- bcde
-> bcde
b <- cde
bc <- de
bcd <- e
bc -> e
b -> e
-> e
e <-
->
===[33]===
a <- bcde
-> bcde
b <- cde
bc <- de
b -> de
bd <- e
bde <-
bd ->
b ->
->
===[34]===
a <- bcde
-> bcde
b <- cde
bc <- de
b -> de
bd <- e
b -> e
be <-
b ->
->
===[35]===
a <- bcde
-> bcde
b <- cde
bc <- de
b -> de
bd <- e
b -> e
-> e
e <-
->
===[36]===
a <- bcde
-> bcde
b <- cde
bc <- de
b -> de
-> de
d <- e
de <-
d ->
->
===[37]===
a <- bcde
-> bcde
b <- cde
bc <- de
b -> de
-> de
d <- e
-> e
e <-
->
===[38]===
a <- bcde
-> bcde
b <- cde
-> cde
c <- de
cd <- e
cde <-
cd ->
c ->
->
===[39]===
a <- bcde
-> bcde
b <- cde
-> cde
c <- de
cd <- e
c -> e
ce <-
c ->
->
===[40]===
a <- bcde
-> bcde
b <- cde
-> cde
c <- de
cd <- e
c -> e
-> e
e <-
->
===[41]===
a <- bcde
-> bcde
b <- cde
-> cde
c <- de
-> de
d <- e
de <-
d ->
->
===[42]===
a <- bcde
-> bcde
b <- cde
-> cde
c <- de
-> de
d <- e
-> e
e <-
->
经典栈问题求解
最新推荐文章于 2021-09-05 23:39:33 发布