CPSC 203, 2026 W1
October 13, 2026
key_value_patterns.py.| Key | Value |
|---|---|
| name | Ian Mitchell |
| department | Computer Science |
| program | M.Sc. |
| start date | 1995-09-01 |
| terms | 7 |
| domestic student | yes |
| ⋮ | ⋮ |
How could we represent this information? Don’t say “dictionary”.
If there are \(n\) key-value pairs in the store, how long does it take to:
dict can perform any of these operations in constant time for any \(n\).Dictionaries / key-value lookup is useful for solving other common problems.
Today: Finish slides / class activity from last lecture for the first five.
Thursday: Translation / mapping.