The prefix form of A-B/ (C * D ^ E)?

1.2k views Asked by At

Could anyone please explain this answer?

Screenshot - Click Here

1

There are 1 answers

0
templatetypedef On

That explanation looks incorrect to me, even though the final answer looks correct. Let’s begin by taking the expression and fully parenthesizing it to show operator precedence:

A - (B / (C * (D^E)))

Notice that this doesn’t match the parenthesization given in the solution, which I suspect is an error in the answers. From here, we see that the top-level operator is the subtraction. The LHS is just the expression A, and the RHS is the expression B / (C * (D^E)), so we can do a partial conversion:

- A [[ whatever the expression is for B / (C * (D^E)) ]]

That nested expression has division as its top-level operator, so we can expand it like this:

- A / B [[ whatever the expression is for C * (D^E) ]]

Repeating this process gives us the following:

- A / B * C [[ whatever the expression is for D^E ]]
- A / B * C ^ D E

Hope this helps!