Problem F - Pre, in and post
Time Limit: 1 second
A common problem in data structures is to determine the traversal of a binary tree. There are three classic ways to do it:
Pre-order: You must visit in sequence the root, left subtree and the right subtree.
In-order: You must visit in sequence the left subtree, the root and the right subtree.
Post-order: You must visit in sequence the left subtree, the right subtree and the root.
See the picture below:
The pre, in and post-order traversal are, respectively, ABCDEF, CBAEDF and CBEFDA. In this problem, you must c