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
Define a full binary tree ?
Explain the Linked List
Is bubble sort faster than selection sort?
How does a selection sort work?
Which language is best for data structures and algorithms?
What is a matrix?
How does a dynamic array work?
Give one example of right rotation.
What is homogeneous array?
What do you mean by the term “percolate up”?
Define a set?
What is application of data structure?
What does a bubble chart show?
What is bubble sort and selection sort?
What is dynamic array in excel?