Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / bipin from utkal university mc
a-b+c*(d/e-(f+g))
a-b+c*(d/e-(+fg))
a-b+c*(/de-(+fg))
a-b+c*(-/de+fg)
a-b+(*c-/de+fg)
-ab+(*c-/de+fg)
+-ab*c-/de+fg (final answer)
Is This Answer Correct ? | 34 Yes | 5 No |
Answer / tadveer verma
a-b+c*(d/e- (+fg))
a-b+c*(/de - +fg)
a-b+c* -/de+fg
a-b+ *c-/de+fg
-ab + *c-/de+fg
+-ab*c-/de+fg
Is This Answer Correct ? | 13 Yes | 2 No |
Answer / lucky
a-b+c*(d/e-(f+g))
a-b+c*(d/e-+fg)
a-b+c*-d/e+fg
a-b+c*-/de+fg
a-b+*c-/de+fg
+a-b*c-/de+fg
+-ab*c-/de+fg
Is This Answer Correct ? | 14 Yes | 4 No |
Answer / madhu
a-b+c*(d/e-(f+g))
a-b+c*(d/e-+fg)
a-b+c*(/de-+fg)
a-b+c*-/de+fg
a-b+*c-/de+fg
-ab+*c-/de+fg
+-ab*c-/de+fg
Is This Answer Correct ? | 11 Yes | 4 No |
Answer / bipin fro uu mca
a-b+c*(/de-(+fg))
a-b+c*(-/de+fg)
a-b+*c-/de+fg
-ab+*c-/de+fg
+-ab*c-/de+fg
Is This Answer Correct ? | 8 Yes | 2 No |
What is vector and types of vector?
What is the use of isEmpty() member methods?
How would you reverse characters of an array without using indexing in the array.
What is complete binary tree in data structure?
How do you sort a list in reverse order?
What is a threaded binary tree? Explain its operation with example?
What is hashing in cyber security?
What is the difference between list, set and map?
What are types of Collision Resolution Techniques and the methods used in each of the types?
What is a reverse linked list.
Which is faster arraylist or hashmap?
What is ordered map?