Skip to content

Commit ddb89f0

Browse files
committed
Remove useless function call
1 parent 687492f commit ddb89f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data-structures/binary-search-tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ BinaryTree.prototype.getDiameter = function () {
308308
var leftHeight = this._getHeight(root._left),
309309
rightHeight = this._getHeight(root._right),
310310
path = leftHeight + rightHeight + 1;
311-
return Math.max(path, Math.max(getDiameter(root._left), getDiameter(root._right)));
311+
return Math.max(path, getDiameter(root._left), getDiameter(root._right));
312312
}.bind(this);
313313
return getDiameter(this._root);
314314
};

0 commit comments

Comments
 (0)