Problem2084--数据结构概论上机考试四-1098

2084: 数据结构概论上机考试四-1098

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 327  Solved: 58
[Submit] [Status] [Web Board] [Creator:]

Description

给出一棵二叉排序树的输入序列,请构造这棵二叉排序树,并给出一个插入的结点(此结点值与已给出的结点值都不同)。要求在二叉排序树中插入此结点,并打印出先序遍历结果。

Input

二叉排序树序列和插入结点

Output

二叉排序树的先序遍历序列

Sample Input Copy

50 30 20 40 70 60 80
55

Sample Output Copy

50 30 20 40 70 60 55 80

Source/Category

426