| | | | | |

Binary Search Trees

  • Associative containers UBST<T,P> and MBST<T,P>
  • "U"nimodal or "M"ultimodal versions
  • Analogous to UOList<T,P> and MOList<T,P>
  • Derive from [inheritance], adapt [composition], or mimic [design pattern], BinaryTree<T>
  • Use binary search -- tree version -- for
    • BST::Insert(t)
    • BST::Remove()
    • BST::Includes(t)
    • BST::LowerBound(t)
    • BST::UpperBound(t)
  • Optional second parameter: predicate object determining order
  • API: Ordered Associative Container
  • On Agenda: Define BST::Iterator (future chapter)

| | Top of Page | 12. Binary Search Trees - 4 of 27