From b62d9a43b44200fbafdb227998bd0d4c27475e0d Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Wed, 30 May 2018 08:18:45 +0300 Subject: [PATCH] Clean up in binary search tree constructor. --- .../tree/binary-search-tree/BinarySearchTree.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data-structures/tree/binary-search-tree/BinarySearchTree.js b/src/data-structures/tree/binary-search-tree/BinarySearchTree.js index 77cc998a..53ce46e9 100644 --- a/src/data-structures/tree/binary-search-tree/BinarySearchTree.js +++ b/src/data-structures/tree/binary-search-tree/BinarySearchTree.js @@ -5,8 +5,7 @@ export default class BinarySearchTree { * @param {function} [nodeValueCompareFunction] */ constructor(nodeValueCompareFunction) { - this.nodeValueCompareFunction = nodeValueCompareFunction; - this.root = new BinarySearchTreeNode(null, this.nodeValueCompareFunction); + this.root = new BinarySearchTreeNode(null, nodeValueCompareFunction); } /**