Add binary search tree.

This commit is contained in:
Oleksii Trekhleb
2018-04-03 07:35:13 +03:00
parent ff2df770b8
commit c5bccffe36
4 changed files with 20 additions and 6 deletions

View File

@@ -5,12 +5,12 @@ export default class BinaryTreeNode {
this.value = value;
}
addLeft(node) {
setLeft(node) {
this.left = node;
return this;
}
addRight(node) {
setRight(node) {
this.right = node;
return this;
}