Upcoming SlideShare
×

# Stack queue

392 views
350 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
392
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
2
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Stack queue

1. 1. 基礎資料結構 FHCRC Summer2008 / 98th LFking
2. 2. 資料？結構？ FHCRC Summer2008 / 98th LFking
3. 3. Stack 堆疊 FHCRC Summer2008 / 98th LFking
4. 4. FHCRC Summer2008 / 98th LFking
5. 5. FHCRC Summer2008 / 98th LFking
6. 6. FHCRC Summer2008 / 98th LFking
7. 7. FHCRC Summer2008 / 98th LFking
8. 8. Pop FHCRC Summer2008 / 98th LFking
9. 9. Push FHCRC Summer2008 / 98th LFking
10. 10. FILO (First In Last Out)LIFO (Last In First Out) FHCRC Summer2008 / 98th LFking
11. 11. // C語言堆疊實作char stack[100];int top=-1;void pop();void push(char n);main(){int ch; char n;puts("1.push 2.pop ?"); scanf("%d",&ch);if(ch==1) scanf("%c",&n),push(n);if(ch==2) pop();} FHCRC Summer2008 / 98th LFking
12. 12. // C語言堆疊實作void pop(){ if(top>0)top--;}void push(char n){ if(n<100) stack[top++]=n;} FHCRC Summer2008 / 98th LFking
13. 13. 例題ACM 514 / 673 FHCRC Summer2008 / 98th LFking
14. 14. ab+c*後序運算式 FHCRC Summer2008 / 98th LFking
15. 15. Queue 佇列 FHCRC Summer2008 / 98th LFking
16. 16. FHCRC Summer2008 / 98th LFking
17. 17. Pop FHCRC Summer2008 / 98th LFking
18. 18. Push FHCRC Summer2008 / 98th LFking
19. 19. FIFO (First In First Out)LILO (Last In Last Out) FHCRC Summer2008 / 98th LFking
20. 20. 輸入/排隊/BFS FHCRC Summer2008 / 98th LFking
21. 21. 環狀佇列 FHCRC Summer2008 / 98th LFking
22. 22. ZeroJudge題目連結 後序運算法 五則運算 ACM Q514 ACM 439參考資料：【資料結構與演算法】 徐熊健 著 FHCRC Summer2008 / 98th LFking