Skip to content

Commit df58a7e

Browse files
authored
Small Tweaks/Fixes (TheAlgorithms#235)
1 parent fd414e2 commit df58a7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Graphs/ConnectedComponents.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class GraphUnweightedUndirected {
1+
class GraphUnweightedUndirectedAdjacencyList {
22
// Unweighted Undirected Graph class
33
constructor () {
44
this.connections = {}
@@ -46,7 +46,7 @@ class GraphUnweightedUndirected {
4646
}
4747

4848
function main () {
49-
const graph = new GraphUnweightedUndirected()
49+
const graph = new GraphUnweightedUndirectedAdjacencyList()
5050
graph.addEdge(1, 2) // Component 1
5151
graph.addEdge(3, 4) // Component 2
5252
graph.addEdge(3, 5) // Component 2

Graphs/PrimMST.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class GraphWeightedUndirectedAdjacencyList {
163163
}
164164

165165
PrimMST (start) {
166-
// Kruskal's Algorithm to generate a Minimum Spanning Tree (MST) of a graph
166+
// Prim's Algorithm to generate a Minimum Spanning Tree (MST) of a graph
167167
// Details: https://en.wikipedia.org/wiki/Prim%27s_algorithm
168168
const distance = {}
169169
const parent = {}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy