Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answers were Sorted based on User's Feedback
Answer / p.divya poojitha
a-b+c*(/de-(+fg))
a-b+c*(t-s) if t=/de;s=+fg
a-b+c*(-ts)
-ab+*c-ts
+-ab*c-ts
sol is +-ab*c-/de+fg
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / deepshikha singh
first we solve() because it has greatest priority
step1 : a-b+c*(d/e-[+fg])
step2 : a-b+c*([/de]-[+fg])
step3 : a-b+c*[-/de+fg]
step4 : a-b+[*c-/de+fg]
step5 : a-[+b*c-/de+fg]
step6: -a+b*c-/de+fg
note :[] sign is use to differentiate two terms after applying
operations.
| Is This Answer Correct ? | 3 Yes | 9 No |
Answer / amit patra
=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
=*-+abcde+fg
| Is This Answer Correct ? | 1 Yes | 13 No |
Answer / piyush kumar
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
=X+Y where X=-ab,c*V=Y
=+XY
=+-abc*V
=+-abc*-TS
=+-abc*-/de+fg
| Is This Answer Correct ? | 3 Yes | 16 No |
What is circular queue example?
What are scalar values?
Write the stack overflow condition.
What is hashing technique? Describe in brief.
What is an externalizable interface?
Does treemap sort automatically?
What is complexity of bubble sort?
When will you sort an array of pointers to list elements, rather than sorting the elements themselves?
What is example of data?
Define a complete binary tree?
When would you use a tuple?
Why do we use dynamic arrays?