-->
当前位置:首页 > 题库

PROGRAMMING:Binary tree based on preorder sequence and middle sequence

Luz5年前 (2021-05-10)题库424
Binary tree based on preorder sequence and middle sequence
###Input example:
In the first line, the length of the input sequence is n, in the second line, n characters are input to indicate the sequence traversed in the first order of the binary tree, and in the third line, n characters are input to indicate the sequence traversed in the middle order of the binary tree
```in
nine
ABDGHCEFI
GDHBAECIF
```
###Output example:
Output binary tree after the sequence traversal.
```out
GHDBEIFCA
```







answer:If there is no answer, please comment