mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Fix binary tree node.
This commit is contained in:
@@ -7,7 +7,7 @@ export default class BinaryTreeNode {
|
||||
}
|
||||
|
||||
get height() {
|
||||
if (!this.left && !this.left) {
|
||||
if (!this.left && !this.right) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user