Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answer Posted / rodel
given-> a - b + c * (d / e - (f + g))
note: remember, before we do the infix expression to postfix expression.
We analyze the given data by using the hierarchy of operation (PEMDAS)
In that way, we can do the operation, tracing the hierarchy nos...
sample:
a - b + c * (d / e - (f + g))
5 6 4 2 3 1
pass1: a - b + c * (d / e - (f g +)) infix -> postfix
pass2: a - b + c * (d e / - f g +) infix -> postfix
pass3: a - b + c * (d e / - f g +) infix -> postfix
pass4: a - b + c * (d e / f g + - ) infix -> postfix
pass5: a b - + c d e / f g + - * infix -> postfix
pass6: a b - c + d e / f g + - * infix -> postfix -> Final Answer
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the idea behind splaying?
What are sorting algorithms used for?
What is array and string?
What are vectors used for in real life?
What is the time complexity of selection sort?
What are three common types of traversals?
Explain exception filter?
Which is the simplest file structure? (a) Sequential (b) Indexed (c) Random (a) Sequential
What is difference between set and map?
Is bucket sort stable?
Is unordered_map a hash table?
Can we null keys in treemap?
List out the applications of a linked list?
Does arraylist maintain insertion order?
How does insertion sort works?