mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-12 20:00:58 +00:00
Fix "函数" and "方法"
This commit is contained in:
@@ -18,7 +18,7 @@ type graphAdjList struct {
|
||||
adjList map[Vertex][]Vertex
|
||||
}
|
||||
|
||||
/* 构造方法 */
|
||||
/* 构造函数 */
|
||||
func newGraphAdjList(edges [][]Vertex) *graphAdjList {
|
||||
g := &graphAdjList{
|
||||
adjList: make(map[Vertex][]Vertex),
|
||||
|
||||
@@ -14,7 +14,7 @@ type graphAdjMat struct {
|
||||
adjMat [][]int
|
||||
}
|
||||
|
||||
/* 构造方法 */
|
||||
/* 构造函数 */
|
||||
func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat {
|
||||
// 添加顶点
|
||||
n := len(vertices)
|
||||
|
||||
Reference in New Issue
Block a user