Unit 1

Efficiency and Order of Growth

« Previous | Next »

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

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

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

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.

« Previous | Next »

Course Info

Learning Resource Types

theaters Lecture Videos
theaters Recitation Videos
assignment_turned_in Problem Sets with Solutions
grading Exams with Solutions
menu_book Online Textbook
assignment_turned_in Programming Assignments with Examples