For the following binary tree inorder traversal yields the expression :
For the following binary tree inorder traversal yields the expression :
Binary tree: root is '−'; its left child is '+' and its right child is '/'.
'+' has left child 'a' and right child '*'; '*' has children 'b' (left) and 'd' (right).
'/' has children 'e' (left) and 'f' (right).
Show answerHide answer
Correct answer: (D) a + b * d − e/f
Explanation
Inorder traversal visits left subtree, root, then right subtree. Left subtree gives a + b * d, then the root −, then the right subtree e / f, giving a + b * d − e/f.