Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVL Tree and spec. #49

Merged
merged 1 commit into from Feb 27, 2015
Merged

AVL Tree and spec. #49

merged 1 commit into from Feb 27, 2015

Conversation

JakeHP
Copy link
Collaborator

@JakeHP JakeHP commented Feb 27, 2015

An extension of a BST. The tree balances itself after insertion and removal by walking to the root, comparing each node's children's heights, and restructuring if necessary.

  • _getHeightAtNode
  • _isBalancedAtNode
  • _maintainHeightBalanceProperty
  • _restructure
  • _rightRight
  • _leftLeft
  • _rightLeft
  • _leftRight

edit: Woops forgot to balance on removal. TODO.

@mgechev
Copy link
Owner

mgechev commented Feb 27, 2015

Great! I'll open an issue for the removal balancing.

mgechev added a commit that referenced this pull request Feb 27, 2015
@mgechev mgechev merged commit e411ce7 into mgechev:master Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants