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
Is it legal to initialize list like this?
Is array faster than arraylist?
What do you mean by Runtime Error
Explain what are the major data structures used in the hierarchical data model?
Can you list out the areas in which data structures are applied extensively?
What is the best case complexity of bubble sort?
Which programming language is best for data structures?
What are red-black trees?
Why linked list is required?
Describe binary tree and its property.
In what areas do data structures applied?
Advanced problems related to Data Structures were asked
Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?
How does linkedhashset work internally?
How do you find a string is anagram or not?