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
What are the disadvantages of using collection classes over arrays?
List the applications of set adt?
how to delete first node from singly linked list?
What is thread and types of thread?
Why sorting algorithms are important?
How do you find the height of a binary tree?
What member function places a new node at the end of the linked list?
Which sorting is best for large data?
Which is the parent class of sortedset
What do you mean by garbage collection?
State the difference between queues and linked lists?
What are the disadvantages of representing a stack or queue by a linked list?
Why we use arraylist instead of linked list?
What are the four characteristics of algorithms?
Is null a binary search tree?