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

Answer Posted / piyush kumar

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
=X+Y where X=-ab,c*V=Y
=+XY
=+-abc*V
=+-abc*-TS
=+-abc*-/de+fg

Is This Answer Correct ?    3 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is any data structure application is classified among files?

550


What happens in insertion sort?

485


Explain about map and their types?

585


Describe the height term in a tree.

540


Can we add elements to final list?

471






What is array sort?

496


Describe the types of data structures?

560


How would you dynamically allocate a one-dimensional and two-dimensional array of integers?

567


How would you swap the Kth node from beginning with Kth node from end in a Linked List.

552


Complete structure of hashmap, very detail description, along with the basic coding of the hashmap internal implementation.

626


Explain the uses of b+ tree.

527


What is heap tree in data structure?

487


What is meant by a dynamic array?

495


Is arraylist a collection?

514


Define balancing condition for AVL Tree.

543