Assigned Reading: none
Handouts (available on-line): Project 5
Programs from this lecture:
Topics Covered:
Definition: a binary search tree satisfies the following two conditions.
The assumption here is that the keys can be ordered (e.g., the keys might be integers). For example, in Figure 1, an inorder walk of the tree will produce the keys 1, 2, 3, 5, 7, 9, 10.
Fig 1. A binary search tree |
Fig 2. Another binary search tree |
Fig 3. After inserting 6 and 8. |
Fig 4. A BST before and after deleting 3. |
Fig 5. A BST before and after deleting 2. |
Fig 6. A BST before and after deleting 7. |