Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answer Posted / elle
a-b+c*(d/e-(f+g))
=a-b+c*(/de-(+fg))
=a-b+c*(T-S) where T=/de,S=+fg
=a-b+c*-(TS)
=-ab+c*-(TS)
=-ab+c*V where V=-TS
=-ab+*cV
=X+Y where X=-ab,*cV=Y
=+XY
=+-ab*cV
=+-ab*c-TS
=+-ab*c-/de+fg
| Is This Answer Correct ? | 41 Yes | 7 No |
Post New Answer View All Answers
Difference between abstract data type, data type and data structure?
How to print element of Array?
List the differences between comparable and comparator interface?
Is bucket sort stable?
Is treemap sorted?
How do I push an element into a stack?
What is an externalizable interface?
Can you sort a string?
What is a threaded binary tree? Explain its operation with example?
Why do we need to use computers to help us sort lists?
Model a data structure for a DFA that takes an event as parameter and performs a desired action.
Explain extended binary tree.
Why is treeset sorted?
What is a b+ tree? Explain its uses.
What stack means?