文件名称:thrt
介绍说明--下载内容均来自于网络,请自行研究使用
2.建立并中序遍历一个排序二叉树
排序二叉树是指左子树的所有节点的值均小于它根节点的值,右子树的所有节点的值均大于它根节点的值,如下图是一棵排序二叉树
输入:
输入有一行,表示若干个要排序的数,输入0时停止
输出
二叉树的凹入表示
和二叉树的中序遍历序列
sample:
input:
56 78 34 89 12 35 67 77 22 57 0
output:
12
22
34
35
56
57
67
77
78
89
12 22 34 35 56 57 67 77 78 89
-2 to establish and in order to traverse a sort of two fork tree
Sort the two fork tree refers to all nodes of the left subtree of the root node values were less than its value, the value of all the nodes in the right subtree is greater than the value of its root node, the tree is a binary tree sort two
Input:
Enter a row, said a number of the number to sort, enter the 0 time to stop
output
A two binary tree representation
And the two cross- tree in the order traversal sequence
Sample:
input:
56 78 34 89 12 35 67 77 22 57 0
output:
12
22
34
35
56
57
67
77
78
89
12 22 34 35 56 57 67 77 78 89
排序二叉树是指左子树的所有节点的值均小于它根节点的值,右子树的所有节点的值均大于它根节点的值,如下图是一棵排序二叉树
输入:
输入有一行,表示若干个要排序的数,输入0时停止
输出
二叉树的凹入表示
和二叉树的中序遍历序列
sample:
input:
56 78 34 89 12 35 67 77 22 57 0
output:
12
22
34
35
56
57
67
77
78
89
12 22 34 35 56 57 67 77 78 89
-2 to establish and in order to traverse a sort of two fork tree
Sort the two fork tree refers to all nodes of the left subtree of the root node values were less than its value, the value of all the nodes in the right subtree is greater than the value of its root node, the tree is a binary tree sort two
Input:
Enter a row, said a number of the number to sort, enter the 0 time to stop
output
A two binary tree representation
And the two cross- tree in the order traversal sequence
Sample:
input:
56 78 34 89 12 35 67 77 22 57 0
output:
12
22
34
35
56
57
67
77
78
89
12 22 34 35 56 57 67 77 78 89
(系统自动生成,下载前可以参看下载内容)
下载文件列表
thrt.cpp