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

Generic unbalanced binary search tree. More...

#include <utility>
#include <tpl_binTreeOps.H>
Include dependency graph for tpl_binTree.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::GenBinTree< NodeType, Key, Compare >
 Simple (unbalanced) binary search tree. More...
 
struct  Aleph::GenBinTree< NodeType, Key, Compare >::Iterator
 Iterator on nodes of the tree. More...
 
struct  Aleph::BinTree< Key, Compare >
 Binary search tree with nodes without virtual destructors,. More...
 
struct  Aleph::BinTreeVtl< Key, Compare >
 Binary search tree with nodes with virtual destructors,. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Detailed Description

Generic unbalanced binary search tree.

Basic BST without balancing. Use for educational purposes or when data is known to be randomly ordered. For general use, prefer balanced trees like AVL or Red-Black.

Complexity

  • Average: O(log n) for balanced input
  • Worst: O(n) for sorted input
See also
tpl_avl.H AVL tree (balanced)
tpl_rb_tree.H Red-Black tree (balanced)
Author
Leandro Rabindranath León

Definition in file tpl_binTree.H.