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 balance factor of a node in avl tree?
Is hashtable fail fast?
Which is better array or linked list?
do records fall under linear or non linear data structures?
What is nsmutablearray?
Define ancestor and descendant ?
How to excel in data structures and algorithms?
What is the height of an empty tree?
What are the goals of data structure?
What is meant by int?
How do I use quick sort?
How do you sort elements in an arraylist?
What data type is enum?
What is arraylist load factor?
Why is hashmap faster?