摘要
在栈大小不受限制和栈大小受限制两种情况下,分析在给定入栈序列(1 2…n)的情况下,出栈序列应满足的性质,并据此给出基于递归的出栈序列计数和输出的算法及程序实现.算法较直观,易于理解.
In two cases that the size of stack is no limit and is limited. In stack-input (1 2 ... n), the nature of stack-output is analyzed, algorithm and program of counting and output based on the recursion method, is elaborated. Algorithms are more intuitive and easy to understand.
出处
《伊犁师范学院学报(自然科学版)》
2015年第1期67-70,共4页
Journal of Yili Normal University:Natural Science Edition
基金
喀什师范学院教研教改重点项目(KJDZ1303
KJDZ1202)
喀什师范学院重点课题((13)2456)
新疆高校科研计划重点项目(XJEDU2014I039)
关键词
栈
出栈序列
降序
递归
算法
程序
stack
stack-output
descending order
recursion
algorithm
program