搜索资源列表
-
0下载:
遍历问题
(时间限制为:1000毫秒)
描述:
已知二叉树的中序和先序遍历可以唯一确定后序遍历、已知中序和后序遍历可以唯一确定先序遍历,但已知先序和后序,却不一定能唯一确定中序遍历。现要求根据输入的中序遍历结果及某一种遍历,要求输出另一种遍历。
输入:
输入包括若干个测试用例,第一行为一个自然数n,表示用例个数,接下来4n行,即每个用例占4行,其中第一行表示第一种遍历方式,第二行为第一种遍历结果,第三行为第二种遍历方式,第4行为第二种遍历结果。注明:先序遍历方式
-
-
0下载:
二叉树的创建,显示,前序,后序,中序遍历-Binary tree creation, display, pre-order, post order, the order traversal
-
-
0下载:
二叉树的排序!前序,中序及后序,并求其深度-Binary tree sort! Pre-order, middle order and post order, and to seek its depth
-
-
0下载:
用visual c++ 2008写的关于二叉树读取、前序、中序和后序遍历算法。调试成功,很好用。-With visual c++ 2008 to write about the binary read, pre-order, the order and post order traversal algorithm. Debugging success, is useful.
-
-
0下载:
可以輸入中序及前序或後序來產生二元搜尋樹
這些樹節點包含了座標
可以幫助您用另一些繪圖程式繪圖-you can input sequence of string about in-order and one of pre-order and post-order for creating binary tree.
these tree nodes include information about coordinate. they can help you to create pic
-