Lesson 22: Hard problems and greedy solutions
Outline:
- Recap: inheritance
- Bin Packing
- problem statement
- “hard” problems and algorithmic complexity
- The Knapsack Problem
- problem statement
- “greedy” solutions
- algorithmic complexity, revisited
Explore after class:
- Review for Quiz 2
- another bin packing example: Exercise 1
- implementing+testing a class:
- writing the
Activity
class: Exercise 2a-c - combining activities: Exercise 2d
- writing the
Want more practice?
- Runestone
- classes:
- dictionaries:
Reading assignment (to be completed by the next class):