I ran into a Mid-Exam Question, that took 4 days ago, I couldent underestand it!
Suppose we have the answer given when we have an inorder traversal of a tree then how come we will find out the solution in case of a preorder traversal. I have the following example with me : When inorder traversing a tree resulted E A C K F H D B G
;
what would the preorder traversal return?
a. FAEKCDBHG
b. FAEKCDHGB
c. EAFKHDCBG
d. FEAKDCHBG
Who can help me in a learning manner?
EDIT: I know the answer is : FAEKCDHGB. but how this calculated?