Fix binary tree node.

This commit is contained in:
Oleksii Trekhleb
2018-04-05 06:51:45 +03:00
parent 7f64f55397
commit b24763e249
2 changed files with 11 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ export default class BinaryTreeNode {
}
get height() {
if (!this.left && !this.left) {
if (!this.left && !this.right) {
return 0;
}