mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Remove live code & console.log, leave examples as comments (Geometry, Graphs, Maths).
This commit is contained in:
@@ -197,14 +197,12 @@ class GraphWeightedUndirectedAdjacencyList {
|
||||
}
|
||||
}
|
||||
|
||||
function main () {
|
||||
const graph = new GraphWeightedUndirectedAdjacencyList()
|
||||
graph.addEdge(1, 2, 1)
|
||||
graph.addEdge(2, 3, 2)
|
||||
graph.addEdge(3, 4, 1)
|
||||
graph.addEdge(3, 5, 100) // Removed in MST
|
||||
graph.addEdge(4, 5, 5)
|
||||
console.log(graph.PrimMST(1))
|
||||
}
|
||||
export { GraphWeightedUndirectedAdjacencyList }
|
||||
|
||||
main()
|
||||
// const graph = new GraphWeightedUndirectedAdjacencyList()
|
||||
// graph.addEdge(1, 2, 1)
|
||||
// graph.addEdge(2, 3, 2)
|
||||
// graph.addEdge(3, 4, 1)
|
||||
// graph.addEdge(3, 5, 100) // Removed in MST
|
||||
// graph.addEdge(4, 5, 5)
|
||||
// graph.PrimMST(1)
|
||||
|
||||
Reference in New Issue
Block a user