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
Explain the common uses of tree database.
Does arraylist maintain insertion order?
Define articulation point?
What is sorting problem?
In tree construction which is the suitable efficient data structure?
What is circular queue in data structure?
Write a code for dynamic allocation of array.
What are the applications of b-tree?
Is a list an array?
Which sorting algorithm is used in arrays sort?
How does a hashtable work?
What is difference between data type and data structure?
Differentiate between file and structure storage structure.
What are the major data structures used in the network data model?
What is the best case complexity of bubble sort?