mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-03 10:40:15 +08:00
Update JavaScript and TypeScript codes for all chapters, rename JavaScript and TypeScript import folder to modules (#402)
* Update JavaScript and TypeScript codes * Rename JavaScript and TypeScript import folder to modules
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
* Author: Zhuo Qinyue (1403450829@qq.com)
|
||||
*/
|
||||
|
||||
|
||||
const { GraphAdjList } = require('./graph_adjacency_list');
|
||||
const { Vertex } = require('../include/Vertex');
|
||||
|
||||
const { Vertex } = require('../modules/Vertex');
|
||||
|
||||
/* 广度优先遍历 BFS */
|
||||
// 使用邻接表来表示图,以便获取指定顶点的所有邻接顶点
|
||||
@@ -36,7 +34,6 @@ function graphBFS(graph, startVet) {
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/* Driver Code */
|
||||
/* 初始化无向图 */
|
||||
const v = Vertex.valsToVets([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||||
|
||||
Reference in New Issue
Block a user