Convert following infix expression to the prefix expression.
a - b + c * (d / e - (f + g))
Answer Posted / naresh
first u need to reverse the given string like this..
))g+f(-e/d(*c+b-a..
after doing this, we need to consider a stack n insert symbolls into the stack whenever u encountered it in the string..
sequence of flow is:
g
f
+
e
d
/
-
c
*
b
+
a
-......
the string obtained is gf+ed/-c*b+a-..
u need to reverse the string for answer i.e
ans is -a+b*c-/de+fg..
| Is This Answer Correct ? | 28 Yes | 23 No |
Post New Answer View All Answers
What are the advantages of sorting and filtering data?
Which is better merge or quick sort?
Which are the sorted collections?
What is heap tree explain with example?
Is heap sort adaptive?
What is Jagged Arrays?
What is data and data types?
Is treeset thread safe?
Give a basic algorithm for searching a binary search tree?
Is array a data structure?
What is data structure and why it is important?
What is the difference between arraylist and array?
What is a queue in data structure?
Is quicksort divide and conquer?
How efficient is bubble sort?