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


Please Help Members By Posting Answers For Below Questions

What are the different types of sorting in data structure?

505


What is dynamic array how it is created?

491


Which is faster array or linked list?

452


how to insert a new node in linked list where free node will be available?

556


Can we remove element from arraylist while iterating?

489






How can we remove loops in a linked list? What are the functions of fast and slow pointers?

667


What is the family trees and connection by clause?

485


Who invented data structure?

630


What is the complexity of arraylist?

474


List the data structures which are used in hierarchical data model.

512


Which is the parent class of printerstatereasons class?

466


How arraylist increase its size?

458


What is a treeset?

479


What is default size of hashmap?

478


What is the use of bubble sort?

520