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

Commit 941feda

Browse files
diegopaiva1trekhleb
authored andcommitted
Fix kruskal's exception message for directed graph (trekhleb#138)
1 parent 88bbfdc commit 941feda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/algorithms/graph/kruskal/kruskal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function kruskal(graph) {
1010
// It should fire error if graph is directed since the algorithm works only
1111
// for undirected graphs.
1212
if (graph.isDirected) {
13-
throw new Error('Prim\'s algorithms works only for undirected graphs');
13+
throw new Error('Kruskal\'s algorithms works only for undirected graphs');
1414
}
1515

1616
// Init new graph that will contain minimum spanning tree of original graph.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /