用二叉树解决出栈序列问题  被引量:5

Solve the Problem of Stack Sequence by Binary Tree

在线阅读下载全文

作  者:吴集林[1] 

机构地区:[1]佛山职业技术学院,广东佛山528000

出  处:《赣南师范学院学报》2005年第6期28-30,共3页Journal of Gannan Teachers' College(Social Science(2))

摘  要:利用二叉树与栈序列的关系,给出了当入栈序列为{1,2,3,……n}时如何得到所有可能的出栈序列的方法,并用C++编程实现了这一算法.另外给出了判断一个序列不是入栈序列{1,2,3,……n}的出栈序列的结论,并用二叉树的方法给出了证明,通过实例验证了以上结论.In this article, the method of how to obtain the out-stack sequence of in-stack sequence {1,2,3... n} has been presented by the way of binarytree. The way has been realized by C ++ programming. A result of judging that a sequence is not the out-stack .sequence of in-stack sequence { 1,2,3.., n} has been presented too. The result has been proved by the way of binary tree.

关 键 词:二叉树 出栈序列 前序遍历 中序遍历 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象