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 indexing an array?
What is entryset method in map?
What is difference between list and array?
What is adt example?
How is hashmap o 1?
Define heap order property?
What are different types of sorting algorithms?
What is circular queue in data structure?
What are some of the best practices relating to the java collection framework?
Which interfaces are implemented by abstractsequentiallist?
How can we reverse a singly linked list?
Why linked lists are better than arrays?
Does set allow null values?
How does arraylist store data?
Define a tree?