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 does each entry in the link list called?
How expression trees are gets represented in data structure?
What is the need of sorting?
How can I study data structures and algorithms?
How to fill element (initialize at once) in an array?
Is copyonwritearraylist thread safe?
What are the 4 types of data?
What are linked lists most commonly used for?
Where will be the free node available while inserting a new node in a linked list?
Does hashmap allow duplicate keys?
Which sorting has less time complexity?
What do you mean by union-by-weight?
What are the non linear data structure?
What is quick sort?
What is the difference between array sort () and array sort t >()?