CS100A Lecture 18
Previous Lecture
- Two dimensional arrays.
- Reasonable size problem (a past assignment).
- Stepwise refinement.
- Use of comments as high-level specifications:
- as high-level commands,
- as representation invariants.
- Incremental development and testing.
- Use of sentinels.
- Static declarations.
- Local declarations, scope, and the reuse of names.
- Heuristic algorithms.
This Lecture
- Representation Rules of Thumb.
- Transform problems to simpler equivalent problems
- Maintain duplicate representations if helpful
- Choose representations that limit search spaces
- Find representations that yield uniform algorithms.