All mock tests are FREE till 31 December — register to save your progress

Consider the infix expression Q : ((A + B) ∗ D) ↑ (E − F). The equivalent postfix expression of Q is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. AB + D ∗ EF − ↑

Explanation

(A + B) → AB+, then ∗ D → AB+D∗. (E − F) → EF−. Finally apply ↑ to the two operands: AB+D∗EF−↑.

More Data Structures and Algorithms questions