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 |
Are linked lists considered linear or non-linear data structure?
What is an expression tree?
What are b tree keys?
why it is difficult to store linked list as an array?
Can a tree be empty?
Is binary tree a binary search tree?
What is difference between for loop and foreach?
Is Linked List 'linear' or 'Non-linear' data structure?
Is array a data structure?
Why enum can not be used directly with printf function?
What is data structure and why we need it?
What is pivot in quicksort?