根据中序遍历和后序遍历重建二叉树
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
给定一棵二叉树的中序遍历和后序遍历,要求重建这棵二叉树,并输出其前序遍历。
Format
Input
第一行:中序遍历的字符串 第二行:后序遍历的字符串
Output
前序遍历的字符串
Samples
DBEAFC
DEBFCA
ABDECF
Limitation
1s, 1024KiB for each test case.