Clean up in binary search tree constructor.

This commit is contained in:
Oleksii Trekhleb 2018-05-30 08:18:45 +03:00
parent b7e27b2f07
commit b62d9a43b4

View File

@ -5,8 +5,7 @@ export default class BinarySearchTree {
* @param {function} [nodeValueCompareFunction] * @param {function} [nodeValueCompareFunction]
*/ */
constructor(nodeValueCompareFunction) { constructor(nodeValueCompareFunction) {
this.nodeValueCompareFunction = nodeValueCompareFunction; this.root = new BinarySearchTreeNode(null, nodeValueCompareFunction);
this.root = new BinarySearchTreeNode(null, this.nodeValueCompareFunction);
} }
/** /**