mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-27 15:41:16 +08:00
Clean up in binary search tree constructor.
This commit is contained in:
parent
b7e27b2f07
commit
b62d9a43b4
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user