mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
Remove live code & console.log, leave examples as comments (Geometry, Graphs, Maths).
This commit is contained in:
@ -101,15 +101,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)
|
||||
console.log(graph.KruskalMST())
|
||||
}
|
||||
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.KruskalMST()
|
||||
|
Reference in New Issue
Block a user