Outline for March 5, 2012

  1. Searching
    1. What it is
    2. Why it is an important problem
  2. Linear search
    1. Look at each element
    2. Unordered list: as good as any [search-1.py]
    3. Ordered list: go until you pass where the value would be [search-2.py]
  3. Binary search
    1. Ordered list only: how it works
    2. Example [search-3.py]
  4. Comparison [search-1c.py] [search-2c.py] [search-3c.py]

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Winter Quarter 2012