Postfix Demo
description
Transcript of Postfix Demo
![Page 1: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/1.jpg)
1
Postfix Demo
Input
push 1
621 3 4 *5 + ** +
![Page 2: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/2.jpg)
2
Postfix Demo
1
Input
Top of stack
push 1
621 3 4 *5 + ** +
![Page 3: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/3.jpg)
3
Postfix Demo
1
Input
Top of stack
621 3 4 *5 + ** +
![Page 4: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/4.jpg)
4
Postfix Demo
1
Input
Top of stack
2
621 3 4 *5 + ** +
![Page 5: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/5.jpg)
5
Postfix Demo
1
Input
Top of stack
2
621 3 4 *5 + ** +
![Page 6: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/6.jpg)
6
Postfix Demo
1
Input
Top of stack
2 3
621 3 4 *5 + ** +
![Page 7: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/7.jpg)
7
Postfix Demo
1
Input
Top of stack
2 3
621 3 4 *5 + ** +
![Page 8: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/8.jpg)
8
Postfix Demo
1
Input
Top of stack
2 3 4
621 3 4 *5 + ** +
![Page 9: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/9.jpg)
9
Postfix Demo
1
Input
Top of stack
2 3 4
621 3 4 *5 + ** +
![Page 10: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/10.jpg)
10
Postfix Demo
1
Input
Top of stack
2 3 4 5
621 3 4 *5 + ** +
![Page 11: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/11.jpg)
11
Postfix Demo
1
Input
Top of stack
2 3 4 5
pop two elements off the stack and push their product
621 3 4 *5 + ** +
![Page 12: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/12.jpg)
12
Postfix Demo
1
Input
Top of stack
2 3
4 5 *
54
pop two elements off the stack and push their product
621 3 4 *5 + ** +
![Page 13: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/13.jpg)
13
Postfix Demo
1
Input
Top of stack
2 3 20
4 5 *
pop two elements off the stack and push their product
621 3 4 *5 + ** +
![Page 14: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/14.jpg)
14
Postfix Demo
1
Input
Top of stack
2 3 20
pop two elements off the stack and push their sum
621 3 4 *5 + ** +
![Page 15: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/15.jpg)
15
Postfix Demo
1
Input
Top of stack
2
3 20 +
203
pop two elements off the stack and push their sum
621 3 4 *5 + ** +
![Page 16: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/16.jpg)
16
Postfix Demo
1
Input
Top of stack
2
3 20 +
23
pop two elements off the stack and push their sum
621 3 4 *5 + ** +
![Page 17: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/17.jpg)
17
Postfix Demo
1
Input
Top of stack
2 23
621 3 4 *5 + ** +
![Page 18: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/18.jpg)
18
Postfix Demo
1
Input
Top of stack
2 23 6
621 3 4 *5 + ** +
![Page 19: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/19.jpg)
19
Postfix Demo
1
Input
Top of stack
2 23 6
621 3 4 *5 + ** +
![Page 20: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/20.jpg)
20
Postfix Demo
1
Input
Top of stack
2
23 6 *
23 6
621 3 4 *5 + ** +
![Page 21: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/21.jpg)
21
Postfix Demo
1
Input
Top of stack
2 138
23 6 *
621 3 4 *5 + ** +
![Page 22: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/22.jpg)
22
Postfix Demo
621 3 4 *5 + ** +
Input
1
Top of stack
2 138
![Page 23: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/23.jpg)
23
Postfix Demo
Input
Top of stack
1
2 138 *
2 138
621 3 4 *5 + ** +
![Page 24: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/24.jpg)
24
Postfix Demo
1
621 3 4 *5 + ** +
Input
Top of stack
2 138 *
276
![Page 25: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/25.jpg)
25
Postfix Demo
1
621 3 4 *5 + ** +
Input
Top of stack
276
![Page 26: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/26.jpg)
26
Postfix Demo
1
621 3 4 *5 + ** +
Input
Top of stack
276
1 276 +
![Page 27: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/27.jpg)
27
Postfix Demo
277
621 3 4 *5 + ** +
Input
Top of stack
1 276 +
![Page 28: Postfix Demo](https://reader035.fdocuments.net/reader035/viewer/2022070407/56814300550346895daf55c0/html5/thumbnails/28.jpg)
28
Postfix Demo
277
621 3 4 *5 + ** +
Input
Top of stack