We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02299b7 commit 4132522Copy full SHA for 4132522
src/data-structures/tree/binary-search-tree/BinarySearchTree.js
@@ -6,6 +6,9 @@ export default class BinarySearchTree {
6
*/
7
constructor(nodeValueCompareFunction) {
8
this.root = new BinarySearchTreeNode(null, nodeValueCompareFunction);
9
+
10
+ // Steal node comparator from the root.
11
+ this.nodeComparator = this.root.nodeComparator;
12
}
13
14
/**
0 commit comments