Round 4: Binary Search Trees

In this and the next round (Chapter Round 5: Hashing) we are interested in the abstract data types for dynamic sets and maps (also called dictionaries in some languages). Here “dynamic” means that the keys, or (key,value) associations in maps, are inserted, searched for and removed all the time in an online fashion. In this round, we will in fact consider ordered sets and ordered maps that

  • ​ assume an ordering between the keys, and

  • ​ allow efficient searching for the smallest, next smallest, etc keys.

In contrast, the data structures described in the next round do not preserve the order of the keys but are usually somewhat faster on the “basic” operations of insert, search, and remove.

Material in Introduction to Algorithms, 3rd ed. (online via Aalto lib):

Some external links: