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 |
Which is better hashset or treeset?
How do you do a mergesort?
How do you sort a map by key?
Why do we need algorithm?
How do you initialize an arraylist?
What are the 4 types of data?
What sorting algorithm does arrays sort use?
Differentiate between iterator and enumeration.
What is the best complexity of bubble sort?
What is indexing an array?
What is the difference between data type and data structure?
Can treeset contain duplicates?