ISRO Scientist/Engineer CSE 2017Data Structures › Stacks and Expression Evaluation
ISRO Scientist/Engineer CSE 2017 PYQ: Choose the equivalent prefix form of the following expression (a+(b-c))*((d-e)/(f+g-h))
Choose the equivalent prefix form of the following expression
(a+(b-c))*((d-e)/(f+g-h))
- A*+a-bc/-de-+fghCorrect answer
- B*+a-bc-/de-+fgh
- C*+a-bc/-ed-+fgh
- D*+ab-c/-de-+fgh
Answer
(A) *+a-bc/-de-+fgh
Approach
Convert the given infix expression to prefix notation by repeatedly identifying the innermost parenthesized subexpressions, converting each to prefix, and substituting back until the whole expression is in prefix form.
Reviewed by ISRO IQ Editorial Team.