期末考-1111405038-俞星合 - #1339
Open
H-HoYu wants to merge 11 commits into
Open
期末考-1111405038-俞星合#1339H-HoYu wants to merge 11 commits into
H-HoYu wants to merge 11 commits into
Conversation
This reverts commit ac4ec36.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RP 摘要 - Binary Search Efficiency
1) 題目摘要
本題要比較線性搜尋(Linear Search)與二分搜尋(Binary Search)在同一組已排序整數陣列上的效能差異,並完成四個重點:
timeit量測兩種搜尋方法的執行時間並比較快慢。本題指定搜尋目標為
K = 138,重點在於呈現 O(n) 與 O(log n) 在比較次數與執行時間上的差異。2) 測試結果(pytest / unittest 輸出貼字)
測試路徑:
weeks/week-18/solutions/1111405038/Binary Search Efficiency2.1 unittest 輸出
執行指令:
輸出:
2.2 pytest 輸出
執行指令:
輸出:
2.3 補充:直接執行測試腳本輸出
由於目前測試檔採用自訂
run_tests()流程(非 pytest/unittest 自動蒐集格式),因此補充直接執行結果:執行指令:
輸出(節錄):
3) 我跟 AI 改了什麼地方
依
AI_LOG.md記錄,主要有兩項改動:撰寫日期:2026-06-22