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 |
Which data structure is used to perform recursion?
What is data algorithm?
Is bucket sort a comparison sort?
How do you find the index of an element in an arraylist?
Is array a dynamic data structure?
What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Tell me what is quick sort?
What do you know about different sorting algorithms?
Describe linear probing with an example.
How can avl tree be useful in all the operations as compared to binary search tree?
List the data structures which are used in network data modal.
Difference between arraylist and linkedlist?