mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 14:10:00 +08:00
Polish the chapter of heap, introduction, preface.
Replace "其它" with "其他"
This commit is contained in:
@@ -63,7 +63,7 @@ public class GraphAdjList {
|
||||
}
|
||||
// 在邻接表中删除顶点 vet 对应的链表
|
||||
adjList.removeValue(forKey: vet)
|
||||
// 遍历其它顶点的链表,删除所有包含 vet 的边
|
||||
// 遍历其他顶点的链表,删除所有包含 vet 的边
|
||||
for key in adjList.keys {
|
||||
adjList[key]?.removeAll(where: { $0 == vet })
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func bucketSort(nums: inout [Double]) {
|
||||
}
|
||||
// 2. 对各个桶执行排序
|
||||
for i in buckets.indices {
|
||||
// 使用内置排序函数,也可以替换成其它排序算法
|
||||
// 使用内置排序函数,也可以替换成其他排序算法
|
||||
buckets[i].sort()
|
||||
}
|
||||
// 3. 遍历桶合并结果
|
||||
|
||||
Reference in New Issue
Block a user