摘要
介绍了栈在解决实际问题中的作用和重要性。通过提出栈序列的生成问题,说明问题的复杂性。在充分分析出栈序列的形成规律的情况下,给出了出栈序列的生成算法。由于该算法所允许入栈的元素个数有限,又对该算法进行了改进,使得改进后的算法对任意长的入栈元素都适用。测试结果表明,该算法对出栈序列的生成具有有效性。
This article introduces the function based on the stack in solving actual problems and the importance of learning stack.Through proposing the problem to generate the pop sequences,it shows the problem is very complex.Having analyzed the rules to form a pop sequence,it gives a generation algorithms to form a pop sequence.Because the algorithm allows the limited number of elements to enter the stack,it has improved the algorithm and made the improved algorithm apply to arbitrary long elements.The test results show that the algorithm is effective for the generation of a pop sequence.
出处
《武汉工业学院学报》
CAS
2013年第1期68-71,共4页
Journal of Wuhan Polytechnic University
基金
国家自然科学基金资助项目(61179032)
关键词
栈
出栈序列
栈操作序列
二进制字符串
算法
stack
pop sequence
stack operation sequences
binary string
algorithm