mirror of
https://github.com/krahets/hello-algo.git
synced 2026-01-12 00:04:24 +08:00
fix(zh-hant translation): graph_traversal.md (#1711)
* 修正 graph_traversal.md 繁體中文版錯誤的文字 `列列` -> `隊列` * Update graph_traversal.md --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
BFS 通常藉助佇列來實現,程式碼如下所示。佇列具有“先入先出”的性質,這與 BFS 的“由近及遠”的思想異曲同工。
|
||||
|
||||
1. 將走訪起始頂點 `startVet` 加入列列,並開啟迴圈。
|
||||
1. 將走訪起始頂點 `startVet` 加入佇列,並開啟迴圈。
|
||||
2. 在迴圈的每輪迭代中,彈出佇列首頂點並記錄訪問,然後將該頂點的所有鄰接頂點加入到佇列尾部。
|
||||
3. 迴圈步驟 `2.` ,直到所有頂點被訪問完畢後結束。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user