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
Explain the implementation of an AVL tree and Binary tree.
write a program to show the insertion and deletion of an element in an array using the position
Is hashmap ordered?
What is a binary search tree? Explain with example?
How does arraylist store data?
How to search binary in a sorted array?
Define a path in a tree?
What is return map?
What is priority queue in data structure?
What is the minimum number of nodes in an avl tree of height h?
What is the best data structure and algorithm to implement cache?
Which is best array or linked list?
How does selection sort work?
Name few collections map implementations?
Can we add duplicate keys in a hashmap?