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
What is time complexity of sorting algorithms?
Can hashmap store null values?
Why is data structure needed?
Why we use linked list?
Why sorting is done?
Which programming language is best for data structures?
What are the topics in data structures?
Can the double-checked locking fail on a single processor system?
What is merge sort in daa?
What are the advantages of binary search over linear search?
What is difference between rb tree and avl tree?
What is a hashers run?
How do you find the height of a binary tree?
Define a right-skewed binary tree?
Which is the best book for data structures and algorithms?