Binary Search Trees: Motivation
We wish to implement the Dictionary ADT with the additional method “getAll” (return all data elements in ascending order of their keys).
Keys are now assumed to be ordered (“comparable”).
Hashing with linear open addressing requires
?(D + n log n) for getAll, whereas BSTs can do it in O(n).
n = number of data elements.