Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))

Answer Posted / elle

a-b+c*(d/e-(f+g))
=a-b+c*(/de-(+fg))
=a-b+c*(T-S) where T=/de,S=+fg
=a-b+c*-(TS)
=-ab+c*-(TS)
=-ab+c*V where V=-TS
=-ab+*cV
=X+Y where X=-ab,*cV=Y
=+XY
=+-ab*cV
=+-ab*c-TS
=+-ab*c-/de+fg

Is This Answer Correct ?    41 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does each entry in the link list called?

499


How expression trees are gets represented in data structure?

504


What is the need of sorting?

516


How can I study data structures and algorithms?

521


How to fill element (initialize at once) in an array?

549






Is copyonwritearraylist thread safe?

474


What are the 4 types of data?

524


What are linked lists most commonly used for?

492


Where will be the free node available while inserting a new node in a linked list?

580


Does hashmap allow duplicate keys?

542


Which sorting has less time complexity?

514


What do you mean by union-by-weight?

580


What are the non linear data structure?

488


What is quick sort?

632


What is the difference between array sort () and array sort t >()?

461