Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf58a7e

Browse files
authored
Small Tweaks/Fixes (TheAlgorithms#235)
1 parentfd414e2 commitdf58a7e

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-
classGraphUnweightedUndirected{
1+
classGraphUnweightedUndirectedAdjacencyList{
22
// Unweighted Undirected Graph class
33
constructor(){
44
this.connections={}
@@ -46,7 +46,7 @@ class GraphUnweightedUndirected {
4646
}
4747

4848
functionmain(){
49-
constgraph=newGraphUnweightedUndirected()
49+
constgraph=newGraphUnweightedUndirectedAdjacencyList()
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
constdistance={}
169169
constparent={}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp