Skip to content

Commit 36e0bfe

Browse files
m-maksyutintrekhleb
authored andcommittedJun 27, 2018
Fix the value returned by DisjointSet union (trekhleb#81)
* Fix LinkedList * Fix the prepend method for the LinkedList * Fix the remove method for the MinHeap * Correct a comment * Fix BST removal method * Fix the findEdge method of the graph * Fix the value returned by DisjointSet union
1 parent d69199e commit 36e0bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/data-structures/disjoint-set/DisjointSet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default class DisjointSet {
7070
// If rootB's tree is bigger then make rootB to be a new root.
7171
rootB.addChild(rootA);
7272

73-
return rootB.getKey();
73+
return this;
7474
}
7575

7676
// If rootA's tree is bigger then make rootA to be a new root.

0 commit comments

Comments
 (0)
Please sign in to comment.