UrbanPro
true

Take BTech Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Post - Fix Expression Evaluation Procedure

D Subba Rao
24/02/2018 0 0

Algorithm:


1) Create a stack to store operands (or values).

2) Scan the given expression and do following for every scanned element.

a) If the element is a number, push it into the stack.

b) If the element is a operator, pop operands for the operator from stack. Evaluate the operator and push the result back to the stack

3) When the expression is ended, the number in the stack is the final answer.

0 Dislike
Follow 3

Please Enter a comment

Submit

Other Lessons for You

Software and Hardware
In a computer, there are two major parts available namely hardware and software. both plays an important role in proper functioning of the computer. Hardware are the touchable and physical parts of the...

Introduction to Quantum Computing and Quantum Information - What is a qubit ?
The classical two-state system can have two possible states either 1 or 0 whereas a qubit can be in a superposition between 0 and 1 Qubit is generically represented as liner superposition of basis states ...

Pointers in C/C++
Many students have difficulty in understanding pointers. The best way to understand pointers is through memory representation. Whenever we declare a variable, the computer allocates some amount of memory...
R

Rohan Jain

0 0
0

What Are The Two Forms Of #Include?
There are two variants of #include. The one is #include and the other one is #include”file”. In general the first form that is #include is used to include system defined header files which...

What Is The Difference Between Scope And Lifetime?
Scope of a variable is defined as the block of code from where we can refer or access it. On the other hand the life time of a variable is defined as the time in between allocating memory for it and relinquishing...
X

Looking for BTech Tuition Classes?

The best tutors for BTech Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take BTech Tuition with the Best Tutors

The best Tutors for BTech Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more