SlideShare a Scribd company logo
1 of 35
Postfix Evaluation
Using STACK
SOUMEN SANTRA
MCA, M.TECH, SCJP, MCP
INTRODUCTION
Scan the postfix expression left to right
 If the character x is a digit
 Push it into the stack
 if the character is an operator (+,-,*,/)
 pop two values from the stack
 Perform the operation
 Push the result of the operation into the stack
When all characters in postfix expression are processed pop the
value from the stack and output it.
Postfix Expression
7 5 2 3 + 8 * + 3 + *
Stack
Postfix Evaluation
   = 
7
Postfix Expression
Stack
5 2 3 + 8 * + 3 + *
Postfix Evaluation
   = 
7
Postfix Expression
Stack
2 3 + 8 * + 3 + *
5
Postfix Evaluation
7
5
Postfix Expression
Stack
3 + 8 * + 3 + *
2
Postfix Evaluation
   = 
7
5
Postfix Expression
Stack
Postfix Evaluation
+ 8 * + 3 + *
2
3
   = 
Postfix Expression
Stack
Postfix Evaluation
8 * + 3 + *
 +  = 
7
5
2
3
Postfix Expression
Stack
Postfix Evaluation
(
-
7
5
2 3
8 * + 3 + *
 + 3 = 
Postfix Evaluation
Postfix Expression
Stack
(
-
7
5
8 * + 3 + *
2 + 3 = 
d – ( e + f )
a b + c -
*
Stack
Postfix Evaluation
Postfix Expression
Stack
(
-
7
5
8 * + 3 + *
2 + 3 = 5
Postfix Evaluation
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
8 * + 3 + *
5    = 
Postfix Evaluation
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
* + 3 + *
5
8
   = 
e + f )
a b + c – d *
-
(
Stack
Postfix Evaluation
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
+ 3 + *
5
8
 *  = 
+ f )
a b + c – d * e
-
(
Stack
Postfix Evaluation
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
+ 3 + *
5  * 8 = 
f )
a b + c – d * e
-
(
+
Stack
Postfix Evaluation
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
+ 3 + *
5 * 8 = 
)
a b + c – d * e f
-
(
+
Stack
Postfix Evaluation
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
+ 3 + *
5 * 8 = 40
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
+ 3 + *
40    = 
a b + c – d * e f + -
Stack
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
3 + *
40  +  = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
5
3 + *
 + 40 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
3 + *
5 + 40 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
3 + *
5 + 40 = 45
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
45
3 + *
   = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
45
+ *
3
   = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
45
*
3
 +  = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
45
*
 + 3 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
*
45 + 3 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
*
45 + 3 = 48
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
*
   = 
48
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
 *  = 
48
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7
 * 48 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7 * 48 = 
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
7 * 48 = 336
Postfix Evaluation
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
6
18
3 + *
a b + c – d * e f +
-
Stack
( e + f )
a b + c – d *
-
Stack
– ( e + f )
a b + c - d
*
Stack
Postfix Expression
Stack
(
-
336
   = 
THANK YOU
GIVE FEEDBACK

More Related Content

What's hot

Advance Engineering Mathematics
Advance Engineering MathematicsAdvance Engineering Mathematics
Advance Engineering MathematicsPrasenjitRathore
 
Cinemàtica directa e inversa de manipulador
Cinemàtica directa e inversa de manipuladorCinemàtica directa e inversa de manipulador
Cinemàtica directa e inversa de manipuladorc3stor
 
Chpt13 laplacetransformsmatlab
Chpt13 laplacetransformsmatlabChpt13 laplacetransformsmatlab
Chpt13 laplacetransformsmatlabJason Harvey
 
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価Kota Abe
 
C PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMC PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMSaraswathiRamalingam
 
Week12 graph
Week12   graph Week12   graph
Week12 graph IIUM
 
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...Parhamsagharchi
 

What's hot (20)

8th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
8th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...8th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
8th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
 
3rd Semester (Dec-2015; Jan-2016) Computer Science and Information Science E...
3rd Semester (Dec-2015; Jan-2016) Computer Science and Information Science  E...3rd Semester (Dec-2015; Jan-2016) Computer Science and Information Science  E...
3rd Semester (Dec-2015; Jan-2016) Computer Science and Information Science E...
 
Gilat_ch05.pdf
Gilat_ch05.pdfGilat_ch05.pdf
Gilat_ch05.pdf
 
Advance Engineering Mathematics
Advance Engineering MathematicsAdvance Engineering Mathematics
Advance Engineering Mathematics
 
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
Cinemàtica directa e inversa de manipulador
Cinemàtica directa e inversa de manipuladorCinemàtica directa e inversa de manipulador
Cinemàtica directa e inversa de manipulador
 
Chpt13 laplacetransformsmatlab
Chpt13 laplacetransformsmatlabChpt13 laplacetransformsmatlab
Chpt13 laplacetransformsmatlab
 
Digital Notes
Digital NotesDigital Notes
Digital Notes
 
m.tech final
m.tech finalm.tech final
m.tech final
 
4th Semester M Tech: Computer Science and Engineering (Jun-2016) Question Papers
4th Semester M Tech: Computer Science and Engineering (Jun-2016) Question Papers4th Semester M Tech: Computer Science and Engineering (Jun-2016) Question Papers
4th Semester M Tech: Computer Science and Engineering (Jun-2016) Question Papers
 
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
 
C PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMC PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAM
 
5th Semester Electronic and Communication Engineering (June/July-2015) Questi...
5th Semester Electronic and Communication Engineering (June/July-2015) Questi...5th Semester Electronic and Communication Engineering (June/July-2015) Questi...
5th Semester Electronic and Communication Engineering (June/July-2015) Questi...
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
 
Math 3-H6
Math 3-H6Math 3-H6
Math 3-H6
 
เซต
เซตเซต
เซต
 
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
cwit-poster_logo
cwit-poster_logocwit-poster_logo
cwit-poster_logo
 
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...
NUMERICAL METHODS WITH MATLAB : bisection,mueller's,newton-raphson,false poin...
 
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
 

Similar to Postfix Evaluations using Stack

Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxsandeep54552
 
1.3- infix-ti-postfix.pdf
1.3- infix-ti-postfix.pdf1.3- infix-ti-postfix.pdf
1.3- infix-ti-postfix.pdfsoniasharmafdp
 
My lecture infix-to-postfix
My lecture infix-to-postfixMy lecture infix-to-postfix
My lecture infix-to-postfixSenthil Kumar
 
Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monadskenbot
 
2Part I1. Answer questions for the following graph, if .docx
2Part I1. Answer questions for the following graph, if .docx2Part I1. Answer questions for the following graph, if .docx
2Part I1. Answer questions for the following graph, if .docxgilbertkpeters11344
 
Lab Manual IV (1).pdf on C++ Programming practice
Lab Manual IV (1).pdf on C++ Programming practiceLab Manual IV (1).pdf on C++ Programming practice
Lab Manual IV (1).pdf on C++ Programming practiceranaibrahim453
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluationJeeSa Sultana
 
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1zukun
 
Computer notes - Postfix
Computer notes  - PostfixComputer notes  - Postfix
Computer notes - Postfixecomputernotes
 
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...akaptur
 
data structure and algorithm by bomboat_3
data structure and algorithm by bomboat_3data structure and algorithm by bomboat_3
data structure and algorithm by bomboat_3jateno3396
 
computer notes - Data Structures - 7
computer notes - Data Structures - 7computer notes - Data Structures - 7
computer notes - Data Structures - 7ecomputernotes
 
Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)mailmerk
 

Similar to Postfix Evaluations using Stack (20)

Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptx
 
1.3- infix-ti-postfix.pdf
1.3- infix-ti-postfix.pdf1.3- infix-ti-postfix.pdf
1.3- infix-ti-postfix.pdf
 
My lecture infix-to-postfix
My lecture infix-to-postfixMy lecture infix-to-postfix
My lecture infix-to-postfix
 
Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monads
 
Stack and queue
Stack and queueStack and queue
Stack and queue
 
2Part I1. Answer questions for the following graph, if .docx
2Part I1. Answer questions for the following graph, if .docx2Part I1. Answer questions for the following graph, if .docx
2Part I1. Answer questions for the following graph, if .docx
 
Fields in cryptography
Fields in cryptographyFields in cryptography
Fields in cryptography
 
Lab Manual IV (1).pdf on C++ Programming practice
Lab Manual IV (1).pdf on C++ Programming practiceLab Manual IV (1).pdf on C++ Programming practice
Lab Manual IV (1).pdf on C++ Programming practice
 
Circular queues
Circular queuesCircular queues
Circular queues
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
ECCV2008: MAP Estimation Algorithms in Computer Vision - Part 1
 
Computer notes - Postfix
Computer notes  - PostfixComputer notes  - Postfix
Computer notes - Postfix
 
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
 
C applications
C applicationsC applications
C applications
 
data structure and algorithm by bomboat_3
data structure and algorithm by bomboat_3data structure and algorithm by bomboat_3
data structure and algorithm by bomboat_3
 
computer notes - Data Structures - 7
computer notes - Data Structures - 7computer notes - Data Structures - 7
computer notes - Data Structures - 7
 
Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)
 
Htdp05
Htdp05Htdp05
Htdp05
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 

More from Soumen Santra

Cell hole identification in carcinogenic segment using Geodesic Methodology: ...
Cell hole identification in carcinogenic segment using Geodesic Methodology: ...Cell hole identification in carcinogenic segment using Geodesic Methodology: ...
Cell hole identification in carcinogenic segment using Geodesic Methodology: ...Soumen Santra
 
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptx
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptxPPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptx
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptxSoumen Santra
 
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Soumen Santra
 
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...Soumen Santra
 
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...Soumen Santra
 
A Novel Real Time Home Automation System with Google Assistance Technology
A Novel Real Time Home Automation System with Google Assistance TechnologyA Novel Real Time Home Automation System with Google Assistance Technology
A Novel Real Time Home Automation System with Google Assistance TechnologySoumen Santra
 
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions Java basic part 2 : Datatypes Keywords Features Components Security Exceptions
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions Soumen Santra
 
Threads Advance in System Administration with Linux
Threads Advance in System Administration with LinuxThreads Advance in System Administration with Linux
Threads Advance in System Administration with LinuxSoumen Santra
 
Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)Soumen Santra
 
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Soumen Santra
 
Code-Division Multiple Access (CDMA)
Code-Division Multiple Access (CDMA)Code-Division Multiple Access (CDMA)
Code-Division Multiple Access (CDMA)Soumen Santra
 
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : Details
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : DetailsPURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : Details
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : DetailsSoumen Santra
 
Carrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CACarrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CASoumen Santra
 
RFID (RADIO FREQUENCY IDENTIFICATION)
RFID (RADIO FREQUENCY IDENTIFICATION)RFID (RADIO FREQUENCY IDENTIFICATION)
RFID (RADIO FREQUENCY IDENTIFICATION)Soumen Santra
 
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION  SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION Soumen Santra
 
Threads Basic : Features, Types & Implementation
Threads Basic : Features, Types  & ImplementationThreads Basic : Features, Types  & Implementation
Threads Basic : Features, Types & ImplementationSoumen Santra
 
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...Soumen Santra
 

More from Soumen Santra (20)

Cell hole identification in carcinogenic segment using Geodesic Methodology: ...
Cell hole identification in carcinogenic segment using Geodesic Methodology: ...Cell hole identification in carcinogenic segment using Geodesic Methodology: ...
Cell hole identification in carcinogenic segment using Geodesic Methodology: ...
 
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptx
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptxPPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptx
PPT_PAPERID 31_SOUMEN_SANTRA - ICCET23.pptx
 
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
 
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
Traveling salesman problem: Game Scheduling Problem Solution: Ant Colony Opti...
 
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
 
Quick Sort
Quick SortQuick Sort
Quick Sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
A Novel Real Time Home Automation System with Google Assistance Technology
A Novel Real Time Home Automation System with Google Assistance TechnologyA Novel Real Time Home Automation System with Google Assistance Technology
A Novel Real Time Home Automation System with Google Assistance Technology
 
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions Java basic part 2 : Datatypes Keywords Features Components Security Exceptions
Java basic part 2 : Datatypes Keywords Features Components Security Exceptions
 
Java Basic PART I
Java Basic PART IJava Basic PART I
Java Basic PART I
 
Threads Advance in System Administration with Linux
Threads Advance in System Administration with LinuxThreads Advance in System Administration with Linux
Threads Advance in System Administration with Linux
 
Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)
 
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
Carrier Sense Multiple Access With Collision Detection (CSMA/CD) Details : Me...
 
Code-Division Multiple Access (CDMA)
Code-Division Multiple Access (CDMA)Code-Division Multiple Access (CDMA)
Code-Division Multiple Access (CDMA)
 
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : Details
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : DetailsPURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : Details
PURE ALOHA : MEDIUM ACCESS CONTROL PROTOCOL (MAC): Definition : Types : Details
 
Carrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CACarrier-sense multiple access with collision avoidance CSMA/CA
Carrier-sense multiple access with collision avoidance CSMA/CA
 
RFID (RADIO FREQUENCY IDENTIFICATION)
RFID (RADIO FREQUENCY IDENTIFICATION)RFID (RADIO FREQUENCY IDENTIFICATION)
RFID (RADIO FREQUENCY IDENTIFICATION)
 
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION  SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION
SPACE DIVISION MULTIPLE ACCESS (SDMA) SATELLITE COMMUNICATION
 
Threads Basic : Features, Types & Implementation
Threads Basic : Features, Types  & ImplementationThreads Basic : Features, Types  & Implementation
Threads Basic : Features, Types & Implementation
 
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...
CLOUD COMPUTING : BASIC CONCEPT REGARDING LOAD BALANCING AND Virtual Machine ...
 

Recently uploaded

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 

Postfix Evaluations using Stack

  • 1. Postfix Evaluation Using STACK SOUMEN SANTRA MCA, M.TECH, SCJP, MCP
  • 2. INTRODUCTION Scan the postfix expression left to right  If the character x is a digit  Push it into the stack  if the character is an operator (+,-,*,/)  pop two values from the stack  Perform the operation  Push the result of the operation into the stack When all characters in postfix expression are processed pop the value from the stack and output it.
  • 3. Postfix Expression 7 5 2 3 + 8 * + 3 + * Stack Postfix Evaluation    = 
  • 4. 7 Postfix Expression Stack 5 2 3 + 8 * + 3 + * Postfix Evaluation    = 
  • 5. 7 Postfix Expression Stack 2 3 + 8 * + 3 + * 5 Postfix Evaluation
  • 6. 7 5 Postfix Expression Stack 3 + 8 * + 3 + * 2 Postfix Evaluation    = 
  • 7. 7 5 Postfix Expression Stack Postfix Evaluation + 8 * + 3 + * 2 3    = 
  • 8. Postfix Expression Stack Postfix Evaluation 8 * + 3 + *  +  =  7 5 2 3
  • 11. d – ( e + f ) a b + c - * Stack Postfix Evaluation Postfix Expression Stack ( - 7 5 8 * + 3 + * 2 + 3 = 5
  • 12. Postfix Evaluation – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 8 * + 3 + * 5    = 
  • 13. Postfix Evaluation ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 * + 3 + * 5 8    = 
  • 14. e + f ) a b + c – d * - ( Stack Postfix Evaluation ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 + 3 + * 5 8  *  = 
  • 15. + f ) a b + c – d * e - ( Stack Postfix Evaluation ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 + 3 + * 5  * 8 = 
  • 16. f ) a b + c – d * e - ( + Stack Postfix Evaluation ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 + 3 + * 5 * 8 = 
  • 17. ) a b + c – d * e f - ( + Stack Postfix Evaluation ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 + 3 + * 5 * 8 = 40
  • 18. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 + 3 + * 40    = 
  • 19. a b + c – d * e f + - Stack Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 3 + * 40  +  = 
  • 20. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 5 3 + *  + 40 = 
  • 21. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 3 + * 5 + 40 = 
  • 22. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 3 + * 5 + 40 = 45
  • 23. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 45 3 + *    = 
  • 24. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 45 + * 3    = 
  • 25. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 45 * 3  +  = 
  • 26. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 45 *  + 3 = 
  • 27. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 * 45 + 3 = 
  • 28. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 * 45 + 3 = 48
  • 29. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 *    =  48
  • 30. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7  *  =  48
  • 31. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7  * 48 = 
  • 32. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 * 48 = 
  • 33. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 7 * 48 = 336
  • 34. Postfix Evaluation a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 6 18 3 + * a b + c – d * e f + - Stack ( e + f ) a b + c – d * - Stack – ( e + f ) a b + c - d * Stack Postfix Expression Stack ( - 336    = 