Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to get the index of an array element?

1051


Which type of memory allocation is referred for linked list?

1189


Is quicksort faster than merge sort?

887


Explain heapsort. What is its complexity?

975


Which language is best for data structures and algorithms?

925


What is the difference between sorting and classifying?

931


Define union-by-weight?

1023


How do you reference all the elements in a one-dimension array?

1031


What are different types of algorithms?

891


Is complete binary tree?

881


What is storage structure in data structure?

913


What is the heap in data structures?

987


What is difference between an Array and ArrayList?

1006


Is it possible to increase size of array?

957


What is red black tree in data structure?

910