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 are the different types of sorting in data structure?
What is dynamic array how it is created?
Which is faster array or linked list?
how to insert a new node in linked list where free node will be available?
Can we remove element from arraylist while iterating?
How can we remove loops in a linked list? What are the functions of fast and slow pointers?
What is the family trees and connection by clause?
Who invented data structure?
What is the complexity of arraylist?
List the data structures which are used in hierarchical data model.
Which is the parent class of printerstatereasons class?
How arraylist increase its size?
What is a treeset?
What is default size of hashmap?
What is the use of bubble sort?