Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answer Posted / 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 |
Post New Answer View All Answers
What is sort order?
What are the disadvantages of representing a stack or queue by a linked list?
why boundary tag representation is used?
What is difference between arraylist and list?
Is hashtable better than dictionary?
How will you free the memory that is allocated at run time?
Explain what are the major data structures used in the network data model?
What do you mean by 2-3-4 tree?
What is the use of prototype?
Write a program for Sorting an Array. Which sorting will you prefer?
Difference between calloc and malloc in data structures?
How can I search for data in a linked list?
Which sorting technique is best in worst case?
Which data structures are used in bfs and dfs algorithm?
List the applications of set adt?