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 balance on removal. Added remove specs. #51

Merged
merged 1 commit into from Feb 28, 2015
Merged

AVL Tree balance on removal. Added remove specs. #51

merged 1 commit into from Feb 28, 2015

Conversation

JakeHP
Copy link
Collaborator

@JakeHP JakeHP commented Feb 28, 2015

Main changes are

  • _getNodesToRestructureInsert
  • _getNodesToRestructureRemove

These were needed since the way I was calculating the nodes to be restructured before (note this old comment)...

//During restructure, use last 3 nodes traveled.

...only worked for insertion (and missed a special case). The way removal determines which nodes to restructure is very different hence the new function.

@JakeHP
Copy link
Collaborator Author

JakeHP commented Feb 28, 2015

My next TODO is to get a lot more test coverage on all the data structures.

mgechev added a commit that referenced this pull request Feb 28, 2015
AVL Tree balance on removal. Added remove specs.
@mgechev mgechev merged commit ab55692 into mgechev:master Feb 28, 2015
@mgechev
Copy link
Owner

mgechev commented Feb 28, 2015

I will add you as a project collaborator. There's no point making pull requests :-)

@JakeHP
Copy link
Collaborator Author

JakeHP commented Feb 28, 2015

Awesome! 👍

@mgechev
Copy link
Owner

mgechev commented Feb 28, 2015

Done.

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