Only infix expression can be made into an expression tree.

Category: QuestionsOnly infix expression can be made into an expression tree.
Editor">Editor Staff asked 1 month ago

Only infix expression can be made into an expression tree.
 
(a) true
 
(b) false
 
The doubt is from Trees in portion Trees of Data Structures & Algorithms I
 
I had been asked this question in an online interview.

1 Answers
Editor">Editor Staff answered 1 month ago

The correct answer is (b) false
 
For explanation: All infix, prefix and postfix expressions can be made into an expression tree using appropriate algorithms.