15-122 Principles of Imperative Computation
Lecture 15: Binary Search Trees
- Reading: 15-bst.pdf
- Code: bst.c0,
code directory
- Concepts:
- Invariants for binary search trees (BSTs)
- Algorithms for searching and inserting for BSTs
- Implementation of BSTs with pointers rather than arrays
- Worst case runtime efficiency of search and insert for BSTs
- Traversals: inorder (yields sorted keys)
- Recursive implementation of search, insert, traversal, size
- Previous lecture: Restoring Invariants
- Next lecture: Randomized Binary Search
Trees
[ Home
| Schedule
| Assignments
| Resources
]
[
Blackboard
| academic.cs.15-122
]
fp@cs
Frank Pfenning
|