SUNY Geneseo Department of Computer Science


The Height and Size of Binary Trees

{Date}

CSci 141, Fall 2003
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


Misc

Abbreviated office hours tomorrow (2:30 - 3:30)

Questions?

Tree Height and Number of Items

Worst-case time for binary tree search is Theta(h), where h is height of tree

How does number of items (n) relate to height (h)?

[Trees of Height 3 and Different Numbers of Items]

Largest number of elements for a given height

[Full Height h Tree Has 2 Height h-1 Subtrees]

Fewest elements for a given height

[Tree with One Node Per Level]

So searching a tree has a number of cases

Next

More on strong induction and trees


Next Lecture