I am not asking for a expression conversion
conversion from infix to prefix
I am just asking that for a BST, if the input is given in the form of prefix notation, i.e,preorder traversal of BST, Then how do i convert the sequence of values to infix notation, i.e Inorder traversal of a BST.
8
/ \
1 12
\ /
5 9
/ \
4 7
/
6
for example the preorder traversal would give 8 1 5 4 7 6 12 9
how do i convert these sequence of values(inputs) to a inorder traversal expression 1 4 5 6 7 8 9 12.
AS in some cases inorder expression is easier to handle...