From 36e0bfeb324290f4c61923067cb27255c01af224 Mon Sep 17 00:00:00 2001 From: m-maksyutin Date: Wed, 27 Jun 2018 16:22:54 +0300 Subject: [PATCH] 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 --- src/data-structures/disjoint-set/DisjointSet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data-structures/disjoint-set/DisjointSet.js b/src/data-structures/disjoint-set/DisjointSet.js index 2952f0a1..2fe3c25c 100644 --- a/src/data-structures/disjoint-set/DisjointSet.js +++ b/src/data-structures/disjoint-set/DisjointSet.js @@ -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.