mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-09 04:08:42 +08:00
Fix the value returned by DisjointSet union (#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
This commit is contained in:

committed by
Oleksii Trekhleb

parent
d69199e658
commit
36e0bfeb32
@ -70,7 +70,7 @@ export default class DisjointSet {
|
||||
// If rootB's tree is bigger then make rootB to be a new root.
|
||||
rootB.addChild(rootA);
|
||||
|
||||
return rootB.getKey();
|
||||
return this;
|
||||
}
|
||||
|
||||
// If rootA's tree is bigger then make rootA to be a new root.
|
||||
|
Reference in New Issue
Block a user