mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-25 01:27:13 +00:00
feat: Add glossary and description for "哈希集合" (#1310)
This commit is contained in:
@@ -12,7 +12,7 @@ import utils
|
||||
func graphBFS(graph: GraphAdjList, startVet: Vertex) -> [Vertex] {
|
||||
// 顶点遍历序列
|
||||
var res: [Vertex] = []
|
||||
// 哈希表,用于记录已被访问过的顶点
|
||||
// 哈希集合,用于记录已被访问过的顶点
|
||||
var visited: Set<Vertex> = [startVet]
|
||||
// 队列用于实现 BFS
|
||||
var que: [Vertex] = [startVet]
|
||||
|
||||
Reference in New Issue
Block a user