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...

Evaluate the following prefix expression " ++ 26 + - 1324"

Answer Posted / vivek

take a stack and push operators into stack such as (*,+,_,/,etc) and when 2 operands(let a & B) appears pop out 1 operator and perform the expression (a operator B) and push it in 2 a stack



eg: ++2 6+-13 2 4
+(2+6) +-13 2 4
+8+(13-2)4
+8+11 4
+8(11+4)
+8 15
8+15
23 ans

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is collection sort?

936


What is data structures in computer science?

967


What is the difference between hashset and linkedhashset?

1064


Which is the parent class of list class?

956


Is array size dynamic or fixed?

1010


State the difference between arrays and linked lists?

1048


What is the space complexity of selection sort?

1003


How does a selection sort work for an array?

973


What is a weighted graph?

1076


Can you please explain the difference between string and an array?

1211


Can you list out the areas in which data structures are applied extensively?

1067


Is null allowed in list?

902


What is a dequeue?

1034


What do you mean by overflow and underflow?

1009


What do you mean by external sorting?

917