Welcome Guest (Log in)

Display an AVL Tree

StarStarStarStarStar
Array (4) |
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Lloyd Merithew
  • StarStarStarStarStar
  • Stack
  • 1
  • 48 Times
  • 08 September 2024
Displaying Self-Balancing AVL Tree
In computer science, an AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property.

This stack allow you to create an AVL tree or just display one of the test in the "Test menu." You can also manually create a new tree one node at a time using the control "Add Entry."

1. Reset clears the screen and deletes the active AVL Tree.
2. Input field is used for "Add Entry", "Delete Entry" and "Search"
3. Add Entry adds a new node into the AVL Tree and when an inbalance occurs will trigger a re-balancing to occur and be displayed.
4. Delete Entry will delete any node in the AVLTree that maches your entry in the Input Field. This may also trigger re-balancing to occur if necessary.
5. Search will find the node in the AVLTree that maches your entry in the Input Field.

preOrder, inOrder, and postOrder Traversals are various ways to visit all the nodes of the tree.

For an explanation about AVL Trees, check out Wikipedia: https://en.wikipedia.org/wiki/AVL_tree

Another description on Medium: https://heet-parekh19.medium.com/avl-trees-and-its-applications-dfc66fae3f16
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle