From ca037ef6329fefab1f090cc6315582daa8acca64 Mon Sep 17 00:00:00 2001 From: pyagnik12 <53314208+pyagnik1@users.noreply.github.com> Date: Sun, 12 Feb 2023 15:42:05 -0500 Subject: [PATCH] Created documentation for AVL Added documentation for AVL trees in english section. --- docs/en/Tree/# AVL Tree Documentation.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/en/Tree/# AVL Tree Documentation.md diff --git a/docs/en/Tree/# AVL Tree Documentation.md b/docs/en/Tree/# AVL Tree Documentation.md new file mode 100644 index 00000000..1d20feb3 --- /dev/null +++ b/docs/en/Tree/# AVL Tree Documentation.md @@ -0,0 +1,22 @@ +# AVL Tree Documentation +An AVL tree is a self-balancing binary search tree that maintains a height-balanced property for every node in the tree. The height-balanced property ensures that the height difference between the left and right subtrees of every node is at most 1, resulting in a more balanced tree structure. +## Advantages of AVL Trees + +- Fast search, insertion, and deletion: AVL trees are faster than unbalanced binary search trees for search, insertion, and deletion operations because they maintain a more balanced structure. +- Better worst-case performance: AVL trees have a guaranteed worst-case performance of O(log n), which is faster than unbalanced binary search trees that can have a worst-case performance of O(n). + + +## Basic Components of an AVL Tree + +An AVL tree consists of nodes, each containing a value and pointers to its left and right child nodes. The height of a node is defined as the number of edges from the node to its deepest leaf. The height difference between the left and right subtrees of a node is called the balance factor, and it must be at most 1 for every node in the tree. + +## Implementation +- [C](../../../algorithms/C/tree/avl.c) +- [C++](../../../algorithms/CPlusPlus/Trees/avl.cpp) +- [Java](../../../algorithms/Java/trees/avl.java) + +## Video URL +[Youtube Video about AVL](https://www.youtube.com/watch?v=YWqla0UX-38) + +## Others +[Wikipedia](https://en.wikipedia.org/wiki/AVL) \ No newline at end of file