Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_avl.H File Reference

AVL tree implementation (height-balanced BST). More...

#include <algorithm>
#include <ahFunction.H>
#include <tpl_arrayStack.H>
#include <avlNode.H>
#include <tpl_binNodeUtils.H>
Include dependency graph for tpl_avl.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::Gen_Avl_Tree< NodeType, Key, Compare >
 AVL balanced binary search tree. More...
 
struct  Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::Iterator
 Iterator over the nodes. More...
 
struct  Aleph::Avl_Tree< Key, Compare >
 AVL binary search tree with nodes without virtual destructor. More...
 
struct  Aleph::Avl_Tree_Vtl< Key, Compare >
 AVL binary search tree with virtual destructor in its nodes. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Detailed Description

AVL tree implementation (height-balanced BST).

Self-balancing binary search tree maintaining height difference ≤ 1 between subtrees. Guarantees O(log n) for all operations.

Features

  • Strict balance (heights differ by at most 1)
  • Single and double rotations for rebalancing
  • Faster lookups than Red-Black trees

Complexity: O(log n) for insert, search, remove

See also
tpl_rb_tree.H Red-Black tree alternative
Author
Leandro Rabindranath León

Definition in file tpl_avl.H.