Small Tweaks/Fixes (#235)

This commit is contained in:
Tapajyoti Bose
2020-08-01 09:11:19 +05:30
committed by GitHub
parent fd414e2d05
commit df58a7ed5f
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
class GraphUnweightedUndirected {
class GraphUnweightedUndirectedAdjacencyList {
// Unweighted Undirected Graph class
constructor () {
this.connections = {}
@ -46,7 +46,7 @@ class GraphUnweightedUndirected {
}
function main () {
const graph = new GraphUnweightedUndirected()
const graph = new GraphUnweightedUndirectedAdjacencyList()
graph.addEdge(1, 2) // Component 1
graph.addEdge(3, 4) // Component 2
graph.addEdge(3, 5) // Component 2