APCS 大學程式能力檢定考前衝刺
"如你根本並無招式,
敵人如何來破你的招式?"
-- 風清揚
笑傲江湖第十回傳劍
''Why do we fall sir?
So that we can learn to pick ourselves up.''
-- Alfred Pennyworth
Batman Begins (2005)
課前訊息
主講者
- 盧政良 (Zheng-Liang Lu, Arthur)
- 電子信箱:arthurzllu@gmail.com
預備知識
- 具備基本程式語言能力,如:迴圈 (循環)、陣列、遞迴等。
- 資訊科學的高中數學
由於 APCS 考試中觀念題以 C 語言出題,故在應考前務必了解 APCS 考試指定程式語言對照表。 2025-03-31 公告未來觀念題的出題可選擇 C, C++ 和 Python 三種不同語言的題目,詳見官方公告。
工作環境
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
電子郵件通訊禮節
- 電子郵件的標題 (Title) 需要註明班別與中文姓名,並加上信件主旨,如:APCS-nnn 金城武 作業繳交。
- 利用電子郵件提問時,務必提供完整的訊息,諸如:問題敘述、曾經嘗試但是失敗的方案、可能的猜想等等。任何有助於了解問題的材料皆可附上,如程式碼、錯誤訊息的截圖。
常用指令
課程錄影
- 本課程除非經授課老師同意,學生不得擅自進行課程錄音與錄影。
課程架構
流程控制 (Flow Controls)
- 有條件的敘述 (conditional statements) / 分支 (branching)
- if-else if-else
- switch-case-default
- 迴圈 (loops)
- while / do-while loops
- for loops
- 多層迴圈的結構
- 演算法分析 (analysis of algorithms)
陣列 (Arrays)
- 基本語法
- 陣列的第一個元素為何從 0 開始? 這得從記憶體 (memory) 配置說起
- 二維陣列
- 動態配置與堆積 (heap)
- 指標 (pointer) 與陣列
函式與遞迴 (Functions and Recursion)
- 函式定義
- 函式堆疊 (function stack)
- 遞迴演算法 (recursive algorithms)
常見的演算法與工具
- 排序 (sort)
- 二元搜尋法 (binary search)
- 前綴和 (prefix sum)
- 二元樹 (binary tree) 的走訪 (traversal) pdf
- 在無向圖與有向圖上做搜尋
- 深度優先搜尋演算法 (DFS)
- 寬度優先搜尋演算法 (BFS)
- 動態規劃 (dynamic programming, DP) pdf
- 貪心演算法 (greedy algorithms) pdf
補充材料
書籍
- 劉邦鋒,由重構學習 C++ 程式設計,2023
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- 劉邦鋒,由片語學習 C 程式設計,2019
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein, Introduction to Algorithms, 4/e, 2022
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Robert Sedgewick and Kevin Wayne, Algorithms, 4/e, 2011

Standard Template Library (STL)
大學課程
- Jim Huang, 「你所不知道的 C 語言」系列講座, Department of Computer Science and Information Engineering, National Cheng Kung University
- Zheng-Liang Lu, Algorithms Lab, Department of Computer Science and Information Engineering, National Taiwan University
教學平台 / 題庫
跟課堂有關的電影/影集
與程式設計相關的遊戲