Outline for March 5, 2012
Searching
What it is
Why it is an important problem
Linear search
Look at each element
Unordered list: as good as any [
search-1.py
]
Ordered list: go until you pass where the value would be [
search-2.py
]
Binary search
Ordered list only: how it works
Example [
search-3.py
]
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