Created documentation for AVL
Added documentation for AVL trees in english section.pull/1151/head
parent
368ec2e1db
commit
ca037ef632
|
@ -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)
|
Loading…
Reference in New Issue