This commit is contained in:
krahets
2024-09-28 09:26:54 +08:00
parent 03a6cd27ca
commit 4ac4f94628
25 changed files with 119 additions and 162 deletions
@@ -12,7 +12,7 @@ comments: true
1. 翻開字典約一半的頁數,檢視該頁的首字母是什麼,假設首字母為 $m$ 。
2. 由於在拼音字母表中 $r$ 位於 $m$ 之後,所以排除字典前半部分,查詢範圍縮小到後半部分。
3. 不斷重複步驟 `1.` 步驟 `2.` ,直至找到拼音首字母為 $r$ 的頁碼為止。
3. 不斷重複步驟 `1.` 和步驟 `2.` ,直至找到拼音首字母為 $r$ 的頁碼為止。
=== "<1>"
![查字典步驟](algorithms_are_everywhere.assets/binary_search_dictionary_step1.png){ class="animation-figure" }