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

How much time does it take to learn data structures?

862


How do you find the depth of a binary tree?

925


What is sorting and classifying?

840


List the data structures which are used in network data modal.

826


Define linear probing?

928


What is data structure geeksforgeeks?

1197


Complete structure of hashmap, very detail description, along with the basic coding of the hashmap internal implementation.

1048


Which is faster quick sort or merge sort?

777


What is sequential search? What is the average number of comparisons in a sequential search?

770


What does list clear do?

812


How many links are there in a binary tree of N nodes?

966


In rdbms, explain what is the efficient data structure used in the internal storage representation?

888


What is a minimum spanning tree?

1006


How does a treemap sort?

781


How do you find the space complexity of a bubble sort?

792