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 difference between data type and variable?
Write a program to reverse a link list.
What is bubble sort and selection sort?
What is collections singletonlist?
What is hash value of a string?
What is difference between while and do while?
How many sorting are there in data structure?
Run time memory allocation is known as in data structure?
What is difference between hashtable and hashmap?
Does hashmap sort automatically?
When is a binary search algorithm best applied?
Define the queue data structure.
Explain multiply linked list in short.
Write program for Bubble Sort ?
What is difference between an Array and ArrayList?