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
How to find the missing element in integer array of 1 to 7?
Write an algorithm to show the reverse of link list?
Is an arraylist an object?
Define non-terminal nodes in a tree?
What is sorting rule in shapes?
Is quicksort faster than merge sort?
How do you replace an element in an arraylist?
Define the term “percolate down”?
Why do we need algorithm?
What is binary tree? Explain its uses.
What do you mean by separate chaining?
Write the algorithm for converting infix expression to postfix expression?
What is tree and its properties?
Is array part of collection framework?
Define balance factor of a node in avl tree?