Upgrade packages.

This commit is contained in:
Oleksii Trekhleb
2018-07-05 16:30:00 +03:00
parent 58640ee7b5
commit 17ad4dc4d1
14 changed files with 1695 additions and 542 deletions

View File

@@ -35,7 +35,9 @@ export default class BinarySearchTreeNode extends BinaryTreeNode {
this.setLeft(newNode);
return newNode;
} else if (this.nodeValueComparator.greaterThan(value, this.value)) {
}
if (this.nodeValueComparator.greaterThan(value, this.value)) {
// Insert to the right.
if (this.right) {
return this.right.insert(value);
@@ -63,7 +65,9 @@ export default class BinarySearchTreeNode extends BinaryTreeNode {
if (this.nodeValueComparator.lessThan(value, this.value) && this.left) {
// Check left nodes.
return this.left.find(value);
} else if (this.nodeValueComparator.greaterThan(value, this.value) && this.right) {
}
if (this.nodeValueComparator.greaterThan(value, this.value) && this.right) {
// Check right nodes.
return this.right.find(value);
}