Skip to content

Instantly share code, notes, and snippets.

@sarahzhao25
Created January 27, 2018 14:50
Show Gist options
  • Save sarahzhao25/88cb4f27cbb2e1f666fb5aa67c60291d to your computer and use it in GitHub Desktop.
Save sarahzhao25/88cb4f27cbb2e1f666fb5aa67c60291d to your computer and use it in GitHub Desktop.
BinarySearchTree.prototype.balanceFactor = function() {
return this.height(this.left) - this.height(this.right);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment