Session Overview
This lecture revolves around the topic of algorithmic efficiency. It introduces the random access model (RAM) of computation and "big O notation" as a way to talk about order of growth. It concludes with binary search. |
Session Activities
Lecture Videos
-
Lecture 8: Efficiency and Order of Growth (00:50:10)
Lecture 8: Efficiency and Order of Growth
> Download from iTunes U (MP4 - 110MB)
> Download from Internet Archive (MP4 - 110MB)
About this Video
Topics covered: Efficiency, problem reduction, RAM, best case, worst case, expected case, growth, exponential growth, polynomial growth, logarithmic growth, global variables.
Resources
Recitation Videos
-
Optional Recitation: Algorithm Complexity and Class Review (00:42:12)
Optional Recitation: Algorithm Complexity and Class Review
> Download from iTunes U (MP4 - 92MB)
> Download from Internet Archive (MP4 - 92MB)
About this Video
Topics covered: Big O notation, algorithm complexity, algorithm comparison example, object-oriented programming, Person class example, defensive programming, private attributes, mutability, aliasing.
Resources
- Recitation handout (PDF) (Courtesy of Sarina Canelake. Used with permission.)
Check Yourself
Why is efficiency important?
› View/hide answer
Efficiency determines how long our programs take to run; when large sets of data are being handled, it can make a huge difference (on the order of years or even millennia) whether our program is efficient or not.
What notation do we use to state complexity?
› View/hide answer
Big O notation.