Outline for May 22, 2009
Reading: §13.1
- Searching
- What it is
- Why it is an important problem
- Linear search
- Look at each element
- Unordered list: as good as any (see
search-1.py)
- Ordered list: go until you pass where the value would be (see
search-2.py)
- Binary search
- Ordered list only; how it works
- Example (see
search-3.py)
- Comparison (see
search-1c.py,
search-2c.py,
search-3c.py)