Introduction - If you have any usage issues, please Google them yourself
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