mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
Fix a comment in graph_adjacency_list
This commit is contained in:
@ -8,8 +8,7 @@ const { Vertex } = require('../include/Vertex')
|
||||
|
||||
/* 基于邻接表实现的无向图类 */
|
||||
class GraphAdjList {
|
||||
// 邻接表,使用哈希表来代替链表,以提升删除边、删除顶点的效率
|
||||
// 请注意,adjList 中的元素是 Vertex 对象
|
||||
// 邻接表,key: 顶点,value:该顶点的所有邻接顶点
|
||||
adjList;
|
||||
|
||||
/* 构造方法 */
|
||||
|
||||
Reference in New Issue
Block a user