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 adt in data structure?
What is bubble sort and selection sort?
Which is the parent class of linkedlist class?
Tell me how to find middle element of linked list in one pass?
What is the difference between Strings and Arrays?
What is complete binary tree and almost complete binary tree?
What is data structure what is need of it?
Write an algorithm to show the postfix expression with the input given as : a b + c d +*f ? .
What is the purpose of sorting?
What are different types of linked lists?
Does hashmap allow duplicate keys?
What is binary search in data structure?
What does args stand for?
What is the similarity between a Structure, Union and enumeration?
how to delete first node from singly linked list?